
{"id":15857,"date":"2014-06-13T18:35:41","date_gmt":"2014-06-13T18:35:41","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=15857"},"modified":"2014-06-13T18:35:41","modified_gmt":"2014-06-13T18:35:41","slug":"how-to-compile-a-program-to-use-electric-fence-library-for-debugging","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/06\/13\/how-to-compile-a-program-to-use-electric-fence-library-for-debugging\/","title":{"rendered":"How to compile a program to use electric fence library for debugging ?"},"content":{"rendered":"<pre>\n$cat efence-p1.c\n#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\nint main()\n{\n\nchar *ptr = (char *) malloc(1024);\nptr[0] = 0;\n\nptr[1024] = 0;\nexit(0);\n}\n$gcc -g efence-p1.c -lefence\n$.\/a.out\n\nElectric Fence 2.2 Copyright (C) 1987-1999 Bruce Perens &lt;bruce@perens.com&gt;\nSegmentation fault\n$\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$cat efence-p1.c #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main() { char *ptr = (char *) malloc(1024); ptr[0] = 0; ptr[1024] = 0; exit(0); } $gcc -g efence-p1.c -lefence $.\/a.out Electric Fence 2.2 Copyright (C) 1987-1999 Bruce Perens &lt;bruce@perens.com&gt; Segmentation fault $<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[141,31,91],"tags":[704],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15857"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=15857"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15857\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=15857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=15857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=15857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}