First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 155526
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Konstantin Arkhipov <voxus@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Dustin Polke <gentoobugsie.20.dsurawicz@spamgourmet.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
apg.dump strace output text/plain Dustin Polke 2006-11-17 15:09 0000 31.25 KB Details
emerge.info And 'emerge --info' text/plain Dustin Polke 2006-11-17 15:11 0000 4.23 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 155526 depends on: Show dependency tree
Bug 155526 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-11-17 15:07 0000
If I call apg with the -y option (print crypted passwords), apg terminates with
a segfault.

I attach a output of 'strace apg -y'.

BR,
Dustin

------- Comment #1 From Dustin Polke 2006-11-17 15:09:20 0000 -------
Created an attachment (id=102236) [edit]
strace output

------- Comment #2 From Dustin Polke 2006-11-17 15:11:01 0000 -------
Created an attachment (id=102237) [edit]
And 'emerge --info'

------- Comment #3 From Konstantin Arkhipov 2006-12-17 09:58:20 0000 -------
i'm unable to reproduce this crash.

could you please re-emerge apg with FEATURES="nostrip" and CFLAGS="-O0 -g" and
post gdb's backtrace here?

gdb --args apg -y
bt

------- Comment #4 From Dustin Polke 2007-01-07 21:30:02 0000 -------
Hi Konstantin,

Happy new year. After the holidays I've got time now to look into this. I
reemerged apg like you asked me. However, I am not familiar with gdb at all.
Invoking it like you asked me I just see the prompt like

dustin@solaris ~ $ gdb --args apg -y
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) 

Could you give me a hint how to produce some useful output?

Thanks.
Dustin

------- Comment #5 From Dustin Polke 2007-01-23 10:33:46 0000 -------
Okay. found some time to look how gdb works. Is the following output sufficient
 or do you need more? Then please tell me what to do.

dustin@solaris ~ $ gdb --args apg -y
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/apg -y
Failed to read a valid object file image from memory.

Program received signal SIGSEGV, Segmentation fault.
0xb7e5f825 in memcpy () from /lib/libc.so.6

------- Comment #6 From Konstantin Arkhipov 2007-02-07 14:39:12 0000 -------
type in shell: gdb --args apg -y
type in gdb: bt

------- Comment #7 From Dustin Polke 2007-02-08 22:02:53 0000 -------
I think this does not help much...

solaris / # gdb --args apg -y
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) bt
No stack.
(gdb) 

------- Comment #8 From Konstantin Arkhipov 2007-02-22 10:39:25 0000 -------
ups.

type in shell: gdb --args apg -y
type in gdb: run
type in gdb: bt

also you can try to add '#include <crack.h>' in restrict.c:~35 and rebuild apg.

------- Comment #9 From Dustin Polke 2007-03-05 16:49:52 0000 -------
Ah, that's better! Here's the output:

GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/apg -y
Failed to read a valid object file image from memory.

Program received signal SIGSEGV, Segmentation fault.
0xb7dbc3d5 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0xb7dbc3d5 in memcpy () from /lib/libc.so.6
#1  0x0805023d in main ()

I added crack.h to restrict.c as well like you suggested but to no avail:

GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/apg -y
Failed to read a valid object file image from memory.

Program received signal SIGSEGV, Segmentation fault.
0xb7e603d5 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0xb7e603d5 in memcpy () from /lib/libc.so.6
#1  0x0805023d in main ()

------- Comment #10 From Konstantin Arkhipov 2007-03-06 15:39:43 0000 -------
since i'm still unable to reproduce it, can you please try the following patch:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=337116;msg=24

?

------- Comment #11 From Dustin Polke 2007-03-07 19:06:35 0000 -------
Bingo!
That patch did the trick. Thanks a lot fo your help!

Including <crack.h> is needed as well, otherwise compilation gives warnings
about implicit function declaration.

I leave the bug still open until a revised ebuild has been commited to portage.

Dustin

------- Comment #12 From Konstantin Arkhipov 2007-03-08 16:36:39 0000 -------
-r3 committed.
thank you for reporting and testing, Dustin.

------- Comment #13 From Dustin Polke 2007-03-08 21:43:47 0000 -------
Could you add a patch to restrict.c as suggested in comment #8?
This will fix the QA warning due to an implicit function declaration.

Thanks.

------- Comment #14 From Konstantin Arkhipov 2007-03-09 11:00:59 0000 -------
committed -r4,
thanks.

First Last Prev Next    No search results available      Search page      Enter new bug