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

  • Home
  • SEARCH
  • 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 6607663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:31:38+00:00 2026-05-25T19:31:38+00:00

I am trying to learn about code vulnerabilities, and am testing some simple programs

  • 0

I am trying to learn about code vulnerabilities, and am testing some simple programs I wrote. However, many of the issues Glibc catches during runtime (e.g. Stack-Smashing, Double Free, etc.). Thus I would like to be able to run my programs without Glibc’s runtime detection errors. Is there a way to turn off Glibc’s detection? (like with a compiler flag, etc).

I saw in a previous link it is described how to turn off ASLR and Canaries, but this is not what I’d like to do, since it still stops errors like a Double Free and some other heap errors I want to try out (http://stackoverflow.com/questions/2340259/how-to-turn-off-gcc-compiler-optimization-to-enable-buffer-overflow).

I also know you can turn off compile-time warnings with the -w flags but that doesn’t seem to be what I want either. I’ve tried reading over the GCC flags and looking up information about Glibc, but I haven’t gotten anywhere yet. Thus I would greatly appreciate any help. Thanks.

  • 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-25T19:31:39+00:00Added an answer on May 25, 2026 at 7:31 pm

    Check the man page for malloc(3) for usage of the MALLOC_CHECK_ environment variable. Using this, you can turn off ‘aborts’ for those double free errors and whatnot to play with things.

    man malloc
    

    So if your program was called ‘badfree’, you can either set MALLOC_CHECK_ (note trailing underscore) with an export command, or just set it every execution of badfree.

    export MALLOC_CHECK_=0
    ./badfree
    

    –or–

    MALLOC_CHECK_=0 ./badfree
    

    Just remember if you use the first method, it’s set for ANY program you run in that shell.

    Settings for MALLOC_CHECK_ from the malloc(3) man page are:

    MALLOC_CHECK_ =
     0  Silently ignore any issues
     1  Send error message to stderr
     2  abort() is called immediately, killing your program.
     3  Do both '1' and '2' (MALLOC_CHECK_ is a bitfield)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn about stack base overflow and write a simple code to
I'm trying to learn about this feature of javascript I keep seeing in code,
I've been trying to learn about applets by studying the code for the Welcome
I am trying to read Android source code to learn about binder, but I
I am trying to learn about simple shape detection for a project I'm working
I am trying to learn about unit testing in Zend Framework. I have installed
I'm trying to learn about $_SESSION variables and I've been following some tutorials I've
This should hopefully be a simple one. I am trying to learn about the
I am trying to write a simple program about UDP Connections to learn about
Trying to learn about php's arrays today. I have a set of arrays like

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.