This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug linuxthreads/761] New: vm86 system call makes pthreads segfault


I first saw this bug when trying to use the vm86 system call with pthreads. I
worked around this by not using pthreads in the same application. The problem
was that I think the vm86 system call would segfault on return whenever pthreads
was explicitly compiled in, but I"m not sure exactly when the segfault occured.
I strongly suspect this is closely related to the following bug report.

Now I have re-encountered this bug in a slightly different way. Even though I
don't use pthreads, it looks like glibc does, and I'm having a similar problem.

This is on gentoo with what they call glibc-2.3.4.20041102, this DOES NOT happen
with glibc-2.3.4.20040808-r1 so it seems like something recent started to cause
this.

After a single call to the vm86 system call, then next subsequent call to printf
causes a segfault. Here is the backtrace:

#0  0x405dfcc3 in _pthread_cleanup_push_defer (buffer=0xbfffedd4, routine=0,
arg=0x0) at cancel.c:181
#1  0x40668b9e in _IO_vfprintf (s=0x407447c0, format=0x804e2a0 "debug> ",
ap=0xbffff204 "\001") at vfprintf.c:1272
#2  0x406714e0 in printf (format=0x0) at printf.c:34
#3  0x08049229 in debug_image () at debugger.cpp:81
#4  0x08048f9e in main (argc=1, argv=0x0) at main.cpp:43

Frames 3 and 4 are my program.

The exact line in _pthreads_cleanup_push_defer that it breaks on is:

"buffer->__canceltype = THREAD_GETMEM(self, p_canceltype);"

I'll try to debug this if I can, but I don't know how much I can figure out. I
can't even see right now how the code execution goes from _IO_vfprintf to
_pthreads_cleanup_push_defer.

I hope this is enough information. Let me know if you want more.

-- 
           Summary: vm86 system call makes pthreads segfault
           Product: glibc
           Version: 2.3.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: linuxthreads
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: mschulkind at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
GCC target triplet: i686-pc-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=761

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]