Hi ! malloc() never allocates just one byte, it depends on the implementation, but you get at least 4 bytes to use maybe 8 or more so there is room for that number of bytes.
And even if you do overwrite the end, you may not get a core dump, a normal C app runs in a single segment and writing outside an allocated area is not violation in that sense, even though most of the time you do get a core dump (sooner or later). If you want the kind of checking you must use some extra library with support for this, I think ElectricFence is included with ReadHat. Mikael ----- Original Message ----- From: "Vimol" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 6:59 AM Subject: Why no core dump??????????? > The C program here is giving out "Hello world" while running in Rethat Linux > 7.2 . It is compiled with ''gcc". > > WHY NO CORE DUMP??? I have malloc only one byte. > Please explain me. > > > Kvimol _______________________________________________ Redhat-devel-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-devel-list