Skip to content

with OOM debug option: section type conflict with __c (PSTR) #4650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
d-a-v opened this issue Apr 18, 2018 · 1 comment
Closed

with OOM debug option: section type conflict with __c (PSTR) #4650

d-a-v opened this issue Apr 18, 2018 · 1 comment

Comments

@d-a-v
Copy link
Collaborator

d-a-v commented Apr 18, 2018

Commit 461c922 (#3769) introduces a call to assert() which causes this error when OOM is enabled.

Calls to malloc and assert are done in the same cpp file libraries/ESP8266mDNS/ESP8266mDNS.cpp (by calling seek() from inside UdpContext.h)

cores/esp8266/umm_malloc/umm_malloc_cfg.h:188:40: error: mem_debug_file causes a section type conflict with __c
 #define malloc(s) ({ static const char mem_debug_file[] PROGMEM = __FILE__; malloc_loc(s, mem_debug_file, __LINE__); })
                                        ^
libraries/ESP8266mDNS/ESP8266mDNS.cpp:754:36: note: in expansion of macro 'os_malloc'
         answer->hostname = (char *)os_malloc(strlen(answerHostName) + 1);


cores/esp8266/pgmspace.h:16:51: note: '__c' was declared here
 #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
                                                   ^
tools/sdk/libc/xtensa-lx106-elf/include/assert.h:17:56: note: in expansion of macro 'PSTR'
 # define assert(__e) ((__e) ? (void)0 : __assert_func (PSTR(__FILE__), __LINE__,

libraries/ESP8266WiFi/src/include/UdpContext.h:154:9: note: in expansion of macro 'assert'
         assert(isValidOffset(pos));
         ^

I'm not sure how this can be handled yet.

@supertony8
Copy link

Solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants