public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mschulkind at gmail dot com" <sourceware-bugzilla@sources.redhat.com>
To: glibc-bugs@sources.redhat.com
Subject: [Bug linuxthreads/761] New: vm86 system call makes pthreads segfault
Date: Thu, 24 Feb 2005 05:40:00 -0000	[thread overview]
Message-ID: <20050224054039.761.mschulkind@gmail.com> (raw)

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.


             reply	other threads:[~2005-02-24  5:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24  5:40 mschulkind at gmail dot com [this message]
2005-03-15  8:20 ` [Bug linuxthreads/761] " jakub at redhat dot com
2005-03-18  6:46 ` mschulkind at gmail dot com
2005-03-20 15:52 ` gotom at debian dot or dot jp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050224054039.761.mschulkind@gmail.com \
    --to=sourceware-bugzilla@sources.redhat.com \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).