Closed p5pRT closed 12 years ago
Hi all\,
I read the docs for submitting a bug for perl on perl.org/rt3. I cannot even get perl 5.8.3 to build on SPARC Solaris 2.8\,as miniperl core dumps with a SIGBUS.
The issue at hand is unlaigned access that I cannot seem to track down. I know they are from dereferencing a pointer to a variable whose natural alignment (say 8 bytes) when that pointer is poting to an address aligned on 4 bytes (but not 8 bytes).
I am using the Forte Developer 7.0 C compiler
cc: Forte Developer 7 C 5.4 2002/03/09
with the -misalign flag to help prevent SIGBUS on an unaligned access\, but miniperl still cores. :-(
Any ideas as to what I should be looking at?
Thanks\,
Tom
Tom Kacvinsky (via RT) wrote:
I am using the Forte Developer 7.0 C compiler
cc​: Forte Developer 7 C 5\.4 2002/03/09
with the -misalign flag to help prevent SIGBUS on an unaligned access\, but miniperl still cores. :-(
Any ideas as to what I should be looking at?
I'd remove that flag for a start\, you shouldn't need it. Also\, what does 'pstack' on the core file say?
-- Alan Burlison --
The RT System itself - Status changed from 'new' to 'open'
Hi Alan\,
OK\, I tried recompiling without -misalign\, and below is a backtrace from dbx (my gdb is segfaulting when reading the miniperl core).
In previous debugging attempts\, I expanded the macro
FILL_ADVANCE_NODE_ARG
in place and found that the misalignment was happening with the macro
ARG_LOC
The misalignment happend because the pointer p (a pointer to struct regnode) us being typecast to a pointer to a struct regnode_1\, and these two structs have different alignmnets. I could force each of these structs to have the same alignment by using a compiler pragma\, but then I get other weird issues. this is why I tried the flag -misalign (but it doesn't work as advertised\, so I think I have encountered a compiler bug).
Hope this helps\,
Tom
tjk@thor:/\<3>src/perl-5.8.3> dbx miniperl core.miniperl.3454 Reading miniperl core file header read successfully Reading ld.so.1 Reading libsocket.so.1 Reading libnsl.so.1 Reading libdl.so.1 Reading libm.so.1 Reading libpthread.so.1 Reading libc.so.1 Reading libmp.so.2 Reading libc_psr.so.1 Reading libthread.so.1 detected a multithreaded program t@1 (l@1) terminated by signal BUS (invalid address alignment) Current function is S_reganode 4343 FILL_ADVANCE_NODE_ARG(ptr\, op\, arg); (dbx) where current thread: t@1 =>[1] S_reganode(my_perl = 0x10035b7c0\, pRExC_state = 0xffffffff7fffd4d0\, op = '.'\, arg = 2U)\, line 4343 in "regcomp.c" [2] S_reg(my_perl = 0x10035b7c0\, pRExC_state = 0xffffffff7fffd4d0\, paren = 1\, flagp = 0xffffffff7fffcce0)\, line 2471 in "regcomp.c" [3] S_regatom(my_perl = 0x10035b7c0\, pRExC_state = 0xffffffff7fffd4d0\, flagp = 0xffffffff7fffce30)\, line 2845 in "regcomp.c" [4] S_regpiece(my_perl = 0x10035b7c0\, pRExC_state = 0xffffffff7fffd4d0\, flagp = 0xffffffff7fffcf28)\, line 2622 in "regcomp.c" [5] S_regbranch(my_perl = 0x10035b7c0\, pRExC_state = 0xffffffff7fffd4d0\, flagp = 0xffffffff7fffd238\, first = 1)\, line 2570 in "regcomp.c" [6] S_reg(my_perl = 0x10035b7c0\, pRExC_state = 0xffffffff7fffd4d0\, paren = 0\, flagp = 0xffffffff7fffd608)\, line 2417 in "regcomp.c" [7] Perl_pregcomp(my_perl = 0x10035b7c0\, exp = 0x10038b0c0 "^(\w+)=(['"])(.*\n)"\, xend = 0x10038b0d3 ""\, pm = 0x1003a2300)\, line 1838 in "regcomp.c" [8] Perl_pmruntime(my_perl = 0x10035b7c0\, o = 0x1003a2300\, expr = 0x1003a0500\, repl = (nil))\, line 2692 in "opmini.c" [9] Perl_yyparse(my_perl = 0x10035b7c0)\, line 710 in "perly.y" [10] S_parse_body(my_perl = 0x10035b7c0\, env = (nil)\, xsinit = 0x100042368 = &`miniperl`miniperlmain.c`xs_init(struct interpreter *my_perl))\, line 1701 in "perl.c" [11] perl_parse(my_perl = 0x10035b7c0\, xsinit = 0x100042368 = &`miniperl`miniperlmain.c`xs_init(struct interpreter *my_perl)\, argc = 4\, argv = 0xffffffff7fffdec8\, env = (nil))\, line 1211 in "perl.c" [12] main(argc = 4\, argv = 0xffffffff7fffdec8\, env = 0xffffffff7fffdef0)\, line 84 in "miniperlmain.c"
On Tue\, 24 Feb 2004\, Alan Burlison via RT wrote:
Tom Kacvinsky (via RT) wrote:
I am using the Forte Developer 7.0 C compiler
cc​: Forte Developer 7 C 5\.4 2002/03/09
with the -misalign flag to help prevent SIGBUS on an unaligned access\, but miniperl still cores. :-(
Any ideas as to what I should be looking at?
I'd remove that flag for a start\, you shouldn't need it. Also\, what does 'pstack' on the core file say?
-- Alan Burlison --
On Mon\, Feb 23\, 2004 at 06:47:25PM -0000\, Tom Kacvinsky wrote:
I read the docs for submitting a bug for perl on perl.org/rt3.
Which docs exactly did you find? I ask because I'd like to make sure that they mention sending the output of the generated "myconfig" script if perl won't even build.
Actually\, I think I lied a little. The "docs" that I read where on the rt3 page when I opened a new ticket. It said to use the perlbug script in utils.
Since perl didn't build\, I assumed that I would need to make a bug report in some other way.
Attached is my "myconfig" script.
Regards\,
Tom
On Tue\, 24 Feb 2004\, Yitzchak Scott-Thoennes via RT wrote:
On Mon\, Feb 23\, 2004 at 06:47:25PM -0000\, Tom Kacvinsky wrote:
I read the docs for submitting a bug for perl on perl.org/rt3.
Which docs exactly did you find? I ask because I'd like to make sure that they mention sending the output of the generated "myconfig" script if perl won't even build.
#!/bin/sh
# This script is designed to provide a handy summary of the configuration # information being used to build perl. This is especially useful if you # are requesting help from comp.lang.perl.misc on usenet or via mail.
# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm. cat \<\<'!NO!SUBS!' Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=solaris\, osvers=2.8\, archname=sun4-solaris-thread-multi-64 uname='sunos thor 5.8 generic_108528-22 sun4u sparc sunw\,ultra-250 solaris ' config_args='' hint=recommended\, useposix=true\, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler: cc='/opt/SUNWspro/bin/cc'\, ccflags ='-D_REENTRANT -DDEBUGGING -xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\, optimize='-g'\, cppflags='-D_REENTRANT -DDEBUGGING' ccversion='Forte Developer 7 C 5.4 2002/03/09'\, gccversion=''\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=8\, doublesize=8\, byteorder=87654321 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16 ivtype='long long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=8\, prototype=define Linker and Libraries: ld='/opt/SUNWspro/bin/cc'\, ldflags =' -xarch=v9 ' libpth=/usr/lib/64 libs=-lsocket -lnsl -ldl -lm -lpthread perllibs=-lsocket -lnsl -ldl -lm -lpthread libc=/usr/lib/sparcv9/libc.so\, so=so\, useshrplib=false\, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' ' cccdlflags='-KPIC'\, lddlflags=' -G -xarch=v9'
!NO!SUBS!
On Tue\, Feb 24\, 2004 at 08:30:43AM -0800\, Yitzchak Scott-Thoennes wrote:
On Mon\, Feb 23\, 2004 at 06:47:25PM -0000\, Tom Kacvinsky wrote:
I read the docs for submitting a bug for perl on perl.org/rt3.
Which docs exactly did you find? I ask because I'd like to make sure that they mention sending the output of the generated "myconfig" script ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if perl won't even build.
On Tue\, Feb 24\, 2004 at 12:56:36PM -0500\, Thomas J. Kacvinsky wrote:
Attached is my "myconfig" script.
I know what Yitzchak meant\, but I guess that his choice of phrase wasn't perfect. When perl fails to build what is useful is the output from running the myconfig script.
However\, Alan is the expert here\, and seems to be doing fine without it.
The bug reporting docs could do with improving. Mainly by being made much shorter. I will try to do this before 5.8.4
Nicholas Clark
On Wed Feb 25 14:14:24 2004\, nicholas wrote:
On Tue\, Feb 24\, 2004 at 08:30:43AM -0800\, Yitzchak Scott-Thoennes wrote:
On Mon\, Feb 23\, 2004 at 06:47:25PM -0000\, Tom Kacvinsky wrote:
I read the docs for submitting a bug for perl on perl.org/rt3.
Which docs exactly did you find? I ask because I'd like to make sure that they mention sending the output of the generated "myconfig" script ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if perl won't even build.
On Tue\, Feb 24\, 2004 at 12:56:36PM -0500\, Thomas J. Kacvinsky wrote:
Attached is my "myconfig" script.
I know what Yitzchak meant\, but I guess that his choice of phrase wasn't perfect. When perl fails to build what is useful is the output from running the myconfig script.
However\, Alan is the expert here\, and seems to be doing fine without it.
The bug reporting docs could do with improving. Mainly by being made much shorter. I will try to do this before 5.8.4
Nicholas Clark
Bug reporting could still do with improving : D (I personally would really like a web interface)
But back to the ticket\, since Solaris 8 is long out of support\, and newer Perls build on Solaris 10/11\, I vote to close this.
@cpansprout - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#26999 (status was 'resolved')
Searchable as RT26999$