title: Call to malloc failing in gdb session
body: <p>I am trying to debug a C program and gdb is telling me there is a segfault on line 329 of a certain function.  So I set a break point for that function and I am trying to step through it.  However, whenever I hit line 68 I get this complaint from gdb:</p>
  
  <pre><code>(gdb) step
  68              next_bb = (basic_block *)malloc(sizeof(basic_block));
  (gdb) step
  *__GI___libc_malloc (bytes=40) at malloc.c:3621
  3621    malloc.c: No such file or directory.
  in malloc.c
  </code></pre>
  
  <p>I don't know what this means.  The program runs perfectly on all but one set of inputs so this call to malloc clearly succeeds during other executions of the program.  And, of course, I have:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;.
  </code></pre>
  
  <p>Here is the source code:</p>
  
  <pre><code>    // Block currently being built.
      basic_block *next_bb = NULL;
      // Traverse the list of instructions in the procedure.
      while (curr_instr != NULL)
      {
          simple_op opcode = curr_instr-&gt;opcode;
          // If we are not currently building a basic_block then we must start a new one.
          // A new block can be started with any kind of instruction.
          if (!in_block)
          {
              // Create a new basic_block.
              next_bb = (basic_block *)malloc(sizeof(basic_block));
  </code></pre>