perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
Subject Re: MP2 + Bleedperl broken
Date Sun, 08 Jan 2006 06:47:26 GMT
Hi all,

As I've reviving this thread, let me link to it:
http://www.gossamer-threads.com/lists/modperl/dev/83393

I'll start by saying across at least 20 FreeBSD computers and a mirriad 
of versions and configs between 5.0 and 7.0-current, I've never seen 
this work since at least August 22, 2005.

Thats bleed versions ~25197 -> current (26703)

The original error:
pgollucci@freebsd.p6m7g8.net 
/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork 147>make
cd "src/modules/perl" && make
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-Wdeclaration-after-statement -I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed/lib/5.9.3/i386-freebsd-thread-multi-64int/CORE

-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -Wdeclaration-after-statement 
-DMP_COMPAT_1X -DMP_DEBUG -O0 -DMP_TRACE -DAP_DEBUG -g3 -O0 -DPIC -fPIC 
  -c modperl_error.c && mv modperl_error.o modperl_error.lo
modperl_error.c: In function `modperl_croak':
modperl_error.c:93: warning: null format string
*** Error code 1

Stop in 
/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork/src/modules/perl.
*** Error code 1

Stop in /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork.

Okay, so I've done some digging:
  From proto.h:
  * This file is built by embed.pl from data in embed.fnc, embed.pl,
  * pp.sym, intrpvar.h, perlvars.h and thrdvar.h.
  * Any changes made here will be lost!

So were talking about Perl_croak and/or croak
embed.fnc:
   : croak()'s first parm can be NULL.  Otherwise, mod_perl breaks.
Afprd   |void   |croak          |NULLOK const char* pat|...

and for comaprison sake's, here's 5.8.7
Afprd   |void   |croak      |const char* pat|...


Good to note, that NULLOK is correctly marked in bleed.

the resulting proto.h
PERL_CALLCONV void  Perl_croak(pTHX_ const char* pat, ...)
	__attribute__noreturn__
	__attribute__format__(__printf__,pTHX_1,pTHX_2);


Again, 5.8.7 for comparison
PERL_CALLCONV void  Perl_croak(pTHX_ const char* pat, ...) 	
	__attribute__((noreturn))
	__attribute__format__(__printf__,pTHX_1,pTHX_2);


sadly, thats identical so this is not the problem.

Also, if I were to regenrate it with
: croak()'s first parm can be NULL.  Otherwise, mod_perl breaks.
Afprd   |void   |croak          |NN const char* pat|...

I get

PERL_CALLCONV void      Perl_croak(pTHX_ const char* pat, ...)
                         __attribute__noreturn__
                         __attribute__format__(__printf__,pTHX_1,pTHX_2)
                         __attribute__nonnull__(pTHX_1);


And if I now try to compile mp2
I get a different error

pgollucci@freebsd.p6m7g8.net 
/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork 202>make
cd "src/modules/perl" && make
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-Wdeclaration-after-statement -I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed-26704/lib/5.9.3/i386-freebsd-64int/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -Wdeclaration-after-statement 
-DMP_COMPAT_1X -DMP_DEBUG -O0 -DMP_TRACE -DAP_DEBUG -g3 -O0 -DPIC -fPIC 
  -c modperl_error.c && mv modperl_error.o modperl_error.lo
modperl_error.c: In function `modperl_croak':
******************************************************************************************
modperl_error.c:93: warning: null argument where non-null required (arg 1)
******************************************************************************************
modperl_error.c:93: warning: null format string
*** Error code 1

Stop in 
/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl.
*** Error code 1

Stop in /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork.

Alrighty, so something is amiss... Let me make it simpler -- a test program:

Note, I'll use the "pristine proto.h" from here on out.

cat test.c
#include "EXTERN.h"
#include "perl.h"

int main (int argc, char **argv) {

   Perl_croak(Nullch);

   return 0;
}

gcc -I/home/pgollucci/dev/apps/perl/5.8.7/lib/CORE 
-L/home/pgollucci/dev/apps/perl/5.8.7/lib/CORE -lperl -o test5.8.7 test.c

gcc 
-I/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE 
-L/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE 
-lperl -o test5.9.3 test.c

Amazingly, they BOTH compile..........



Let me get a little more complex and try to isolate mp2 as the culprit
So let me go create a new test file in the my mp2 svn tree:

cat src/modules/perl/test.c
pgollucci@freebsd.p6m7g8.net 
/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl 
318>cat test.c
#include "EXTERN.h"
#include "perl.h"

/* I AM NEW */
#include "mod_perl.h"

int main (int argc, char **argv) {

   Perl_croak(Nullch);

   return 0;
}

Test compile again:
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-Wdeclaration-after-statement -I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -Wdeclaration-after-statement 
-DMP_COMPAT_1X -DMP_DEBUG -O0 -DMP_TRACE -DAP_DEBUG -g3 -O0 -DPIC -fPIC 
test.c
test.c: In function `main':
test.c:8: warning: null format string

JACKPOT, mp2 broke it... but how ?

grep Perl_croak * | grep -v .svn | grep define

src/modules/perl/modperl_perl_unembed.h:#      define croak 
Perl_croak_nocontext

Back to proto.h
#if defined(PERL_IMPLICIT_CONTEXT)
PERL_CALLCONV void      Perl_croak_nocontext(const char* pat, ...)
                         __attribute__noreturn__
                         __attribute__format__(__printf__,1,2)
                         __attribute__nonnull__(1);


LIGHT BULB!

More #define mess in embed.h
#define croak           Perl_croak

Okay, so I can say for sure, that

#ifdef PERL_CORE
#error "core"
#   ifndef croak
#error "not defined croak"
#      define croak Perl_croak_nocontext
#   endif
#endif

the #errors aren't hit, so this is not causing it -- 1 down.

Okay, now I'm just plain pissed.... hardball

gcc -save-temps

modperl_error.i

	  Perl_croak( ((char*)((void *)0)));

I see
# 105 
"/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE/proto.h"

2
  void Perl_croak( const char* pat, ...)
    __attribute__((noreturn))
    __attribute__((format(__printf__,1,2)));


So its not being expanded to anything else.


I'm now at a complete loss........ Something's wrong, but I've no idea what.

As I'm now at my wits end, so any help appreciated.


For reference this particular speal was done on
FreeBSD 6.0-RELEASE i386 GENERIC kernel
perl 5.8.7 release, bleed 26704 both without ithreads
httpd svn apr not threaded prefork mpm
mp2 svn
gcc 3.4.4

------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message