Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:29:38+00:00 2026-05-24T21:29:38+00:00

Is there any way to squelch the output that glibc generates when there is

  • 0

Is there any way to squelch the output that glibc generates when there is memory corruption? Here’s what I’m seeing

make
*** glibc detected *** /home/myname/php/sapi/cli/php: free(): invalid pointer:  x0045d67f ***
======= Backtrace: =========
/lib/libc.so.6(+0x6eb41)[0x380b41]

<snip>
======= Memory map: ========
00115000-00116000 r-xp 00000000 00:00 0          [vdso]
001d7000-001ee000 r-xp 00000000 ca:01 540738     /lib/libpthread-2.12.2.so
001ee000-001ef000 r--p 00016000 ca:01 540738     /lib/libpthread-2.12.2.so
001ef000-001f0000 rw-p 00017000 ca:01 540738     /lib/libpthread-2.12.2.so
<snip>

For the work I am doing, I couldn’t care less about this info, it only matters that the make did not succeed (return value != 0). These messages are filling up the screen and it makes the rest of my output unreadable. I have tried:

make &> /dev/null
{ make ; } &> /dev/null
x=`make 2>&1` &> /dev/null

but none of them catch the output. If it isn’t being written to stderr, where the heck is it coming from? I’d like a solution that doesn’t require rebuilding glibc, if possible.

Here is some code which will give such an error message, but note this has nothing to do with the code I am working on (the php source code). I just want to silence this type of output from my console.

int main()
{
    char* ptr = (char*)malloc(sizeof("test"));
    char array[]= "test";
    ptr = array;
    free(ptr);
    return 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:29:39+00:00Added an answer on May 24, 2026 at 9:29 pm

    Yes: run your code with the environment variable MALLOC_CHECK_ (the trailing underscore is deliberate) set to 0.

    This is partially documented in the libc manual, although there seem to be more options than just the 0, 1 or 2 which are suggested there. (The value ends up being passed as the action argument to malloc_printerr() in glibc’s malloc/malloc.c, and the default value seems to be 3.)

    The reason you can’t redirect it is that it gets written specifically to /dev/tty, unless you have set the environment variable LIBC_FATAL_STDERR_. (I’m not sure this is documented anywhere, but the relevant code can be found here.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way I can set a formatter on models that will convert
Is there any way to set the text color of a certain tab that's
Is there any way that HTML Audio tag could play mp3 in Firefox .
Is there any way in vim that I can select the end of all
Is there any way, to change the field's *min_length* argument inside form constructor? That
Is there any way that I can export dia diagram into html (I know
Is there any way to make resource forks uncopyable? In particular I'm setting a
Is there any way to have something that looks just like a file on
is there any way or any tools that I could use to get from
Is there any way to make phpMyAdmin show exact number of records for InnoDB

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.