public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/25912] Possible race in free_check() with MALLOC_CHECK_=3
Date: Wed, 06 May 2020 15:16:04 +0000	[thread overview]
Message-ID: <bug-25912-131-2eOSfJmHNw@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25912-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=25912

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Vinitha Vijayan from comment #0)
> In case if from signal handler a new malloc request is raised, the thread
> seems to be hanging forever.

Your test is invalid.

Please see:
https://www.gnu.org/software/libc/manual/html_node/Basic-Allocation.html#Basic-Allocation

malloc() is marked AS-unsafe, which means it is not safe to call in an
asynchronous signal handler.

Likewise review 'man signal-safety', and see that 'malloc' is not in the list
of signal-safe functions.

> Could you please confirm if this is a bug?

This is not a bug. The program has detected the invalid free and raised a
SIGABRT, but your handler does something invalid and you hang.

I'm marking this RESOLVED/INVALID.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2020-05-06 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 10:59 [Bug libc/25912] New: " vvijayan at mathworks dot com
2020-05-06  1:09 ` [Bug libc/25912] " vvijayan at mathworks dot com
2020-05-06 15:16 ` carlos at redhat dot com [this message]

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=bug-25912-131-2eOSfJmHNw@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).