×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

stack smashing trackdown

  • Posts: 1185
  • Thank you received: 370
Hi,
my newly developed INDI driver is functionally fine, but having it running an entire day shows this error:
2020-01-14T10:00:11: Driver indi_weatherradio: *** stack smashing detected ***: <unknown> terminated
2020-01-14T10:00:11: Driver indi_weatherradio: stderr EOF
<delProperty device="Weather Radio"/>
2020-01-14T10:00:11: Driver indi_weatherradio: restart #1
Child process 1650 died

Any hints how to track this down?

Wolfgang
4 years 3 months ago #48012

Please Log in or Create an account to join the conversation.

  • Posts: 474
  • Thank you received: 168
That's error from compiler inserted bounds checking that you are usually writing past some locally declared array from either end. Running under gdb should show roughly where on function level as it's only run when returning from a function, so running with valgrind for example might show it earlier as it checks each access. Defining -D_FORTIFY_SOURCE=2 to compile flags might show it earlier too, but I think it's already the default on most distributions.
The following user(s) said Thank You: Wolfgang Reissenberger
4 years 3 months ago #48015

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Indeed, -D_FORTIFY_SOURCE=2 is set for Indi-3rdparty. I think I found the place where the memory violation is created.

Is there an option to catch this exception?

- Wolfgang
4 years 3 months ago #48027

Please Log in or Create an account to join the conversation.

Time to create page: 0.309 seconds