This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/15465] New: LD_DEBUG=symbols crashes when program name is not available
- From: "siddhesh at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 14 May 2013 09:52:46 +0000
- Subject: [Bug dynamic-link/15465] New: LD_DEBUG=symbols crashes when program name is not available
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15465
Bug #: 15465
Summary: LD_DEBUG=symbols crashes when program name is not
available
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
AssignedTo: siddhesh@redhat.com
ReportedBy: siddhesh@redhat.com
Classification: Unclassified
Running a program with LD_DEBUG=symbols defined may crash if the program
tampers with argc and argv.
Steps to Reproduce:
foo.c:
#include <stdio.h>
#include <string.h>
int
main (int argc, char **argv)
{
argv[0] = argv[1];
argc--;
foo ();
}
foo-lib.c:
void
foo (void)
{
return;
}
cc -o foo-lib.so -shared -fPIC foo-lib.c
cc -o foo foo.c ./foo-lib.so
LD_DEBUG=symbols ./foo
Actual Results:
Segfault
Expected Results:
No segfault.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.