[riot-commits] [RIOT-OS/RIOT] 86812c: make calloc "usable" early on

Ludwig Ortmann ludwig.ortmann at fu-berlin.de
Mon Feb 24 09:12:43 CET 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 86812c2abbb4b84e48f917f6c667e83622dfc5fb
      https://github.com/RIOT-OS/RIOT/commit/86812c2abbb4b84e48f917f6c667e83622dfc5fb
  Author: Ludwig Ortmann <ludwig.ortmann at fu-berlin.de>
  Date:   2014-02-22 (Sat, 22 Feb 2014)

  Changed paths:
    M cpu/native/syscalls.c

  Log Message:
  -----------
  make calloc "usable" early on

closes #741

Old versions of the gnu libc uses calloc to allocate dymanic memory
when some error occurs in dlsym.
This results in a segfault as natives calloc wrapper has not been
initialized yet.
As this is a circular dependency and the libc can cope with this, we
just return NULL from the calloc wrapper and hope for the best.

Recent libc versions use a static buffer instead.


  Commit: bc66ba8439dce5597bf6baf65dbf2eb0bb159510
      https://github.com/RIOT-OS/RIOT/commit/bc66ba8439dce5597bf6baf65dbf2eb0bb159510
  Author: Ludwig Ortmann <ludwig.ortmann at fu-berlin.de>
  Date:   2014-02-24 (Mon, 24 Feb 2014)

  Changed paths:
    M cpu/native/syscalls.c

  Log Message:
  -----------
  Merge pull request #762 from LudwigOrtmann/issue_741

make calloc "usable" early on


Compare: https://github.com/RIOT-OS/RIOT/compare/2de9619f2179...bc66ba8439dc


More information about the commits mailing list