public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* strtok and default _REENT structure
@ 2016-07-06  1:27 Dakota Boin
  0 siblings, 0 replies; only message in thread
From: Dakota Boin @ 2016-07-06  1:27 UTC (permalink / raw)
  To: newlib

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-06  1:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06  1:27 strtok and default _REENT structure Dakota Boin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).