This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

strtok and default _REENT structure


Hi all,

Looking for some assistance with the strtok function in newlib. The
function crashes at line strtok.c:102 in a nested macro _REENT_CHECK
called from _REENT_CHECK_MISC. The problem seems to be that the
pointer to the default structure for _REENT is defined as an invalid
memory address and the _REENT_CHECK function attempts to dereference
this invalid pointer and crashes. Incase the address of the pointer is
relevant, it is '0x4001fefe'.

For reference I am targeting a bare metal arm M0+ and my compilation
options were:
--target=arm-none-eabi                \
--disable-newlib-supplied-syscalls    \
--disable-nls                         \
--enable-newlib-reent-small           \
--disable-newlib-fvwrite-in-streamio  \
--disable-newlib-fseek-optimization   \
--disable-newlib-wide-orient          \
--enable-newlib-nano-malloc           \
--disable-newlib-unbuf-stream-opt     \
--enable-lite-exit                    \
--enable-newlib-global-atexit         \
--enable-newlib-nano-formatted-io

Happy to provide more information. Any help would be appreciated.

Best,
Dakota


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]