in reply to Re^2: 32 Bit Perl causing segmentation fault if data is big
in thread 32 Bit Perl causing segmentation fault if data is big
-$ echo $? 139
139 - 128 = 11, which is SIGSEGV on my system (kill -l will identify). So we know it really was a segfault.
i am not aware of debugging perl core using GDB
Same way as any other program.
$ gdb --args perl -e'dump' GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gp +l.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copy +ing" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (no debugging symbols found) (gdb) run Starting program: /usr/bin/perl -edump (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] (no debugging symbols found) (no debugging symbols found) [New Thread 0xb7cfd8c0 (LWP 7206)] Program received signal SIGABRT, Aborted. [Switching to Thread 0xb7cfd8c0 (LWP 7206)] 0xb7eea424 in __kernel_vsyscall () (gdb) bt #0 0xb7eea424 in __kernel_vsyscall () #1 0xb7d5b956 in kill () from /lib/i686/cmov/libc.so.6 #2 0x080a9e3b in Perl_my_unexec () #3 0x080ec065 in Perl_pp_goto () #4 0x080b1879 in Perl_runops_standard () #5 0x080ac6a0 in perl_run () #6 0x08063ddd in main () (gdb) q The program is running. Exit anyway? (y or n) y
not yet. but installing a new version in professional env is very difficult as i need to get sign off from lot of people.
You don't need to replace the system Perl. You can install it in a temporary directory somewhere.
Unzip Perl in a clean directory and run the following:
sh Configure -des -Doptimize="-g" -Dprefix=$HOME/tmp_perl make make test make install
-Doptimize="-g" makes it a debug build, which isn't good for production, but good for finding problems inside of Perl itself.
-$ perl -v This is perl, v5.8.0 built for aix
Hum, I hear that 5.8.0 was a pretty bad version. 5.8.1 was better, and so much has been fixed since then.
#!/usr/local/perl-5.6.1/bin/perl
Wait, no, you're not using 5.8.0, you're using something even older!
And the 64-bit version appears to use 5.8.2. That could explain the difference. Or maybe not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: 32 Bit Perl causing segmentation fault if data is big
by peacelover1976 (Initiate) on Mar 19, 2010 at 00:00 UTC | |
by ikegami (Patriarch) on Mar 19, 2010 at 00:22 UTC |