From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] malloc: Simplify implementation of __malloc_assert
Date: Fri, 22 Jul 2022 13:38:03 +0200 [thread overview]
Message-ID: <871qudfkdg.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <67d80a43-c65a-b9db-af46-c73562e6c5b2@linaro.org> (Adhemerval Zanella Netto's message of "Thu, 21 Jul 2022 10:40:11 -0300")
* Adhemerval Zanella Netto:
>> I think we converted almost all asserts that are reachable through heap
>> corruption into malloc_printerr a couple of years ago, so the diagnostic
>> value of the line number will be really low. That's why I had to resort
>> to GDB to test this.
>>
>> Do you insist that I add file and line number information?
>
> I think it should be ok, what bothers me is we need to reimplement the
> assert macro for malloc usage.
It occurred to me that we do not need to use stderr for internal assert
calls. We can use a different implementation based on __libc_message.
Then the malloc code does not need its own version anymore. We can also
change __libc_message to make it non-catchable (in process), and reset
SIGABRT to SIG_DFL earlier. But maybe the last step goes too far.
Thanks,
Florian
prev parent reply other threads:[~2022-07-22 11:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 10:34 Florian Weimer
2022-07-21 11:43 ` Siddhesh Poyarekar
2022-07-21 12:36 ` Carlos O'Donell
2022-07-21 13:10 ` Adhemerval Zanella Netto
2022-07-21 13:24 ` Adhemerval Zanella Netto
2022-07-21 13:28 ` Florian Weimer
2022-07-21 13:26 ` Florian Weimer
2022-07-21 13:40 ` Adhemerval Zanella Netto
2022-07-22 11:38 ` Florian Weimer [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=871qudfkdg.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@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).