https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57965

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gmx dot de

--- Comment #3 from Harald Anlauf <anlauf at gmx dot de> ---
The dump tree of the allocation looks strange:

  a = (struct mytype *) __builtin_malloc (4);
...
  {
    struct mytype mytype.0;

    __builtin_memmove ((void *) mytype.0.str_value, (void *) &0B, 1);
    __builtin_memset ((void *) mytype.0.str_value + 1, 32, 41);
    *a = mytype.0;
  }

Instead of setting the string's first character to zero,
the memmove appears to access a null pointer.

Or am I missing something?

Reply via email to