me-no-dev / RasPiArduino

Arduino Framework for RaspberryPI
333 stars 75 forks source link

Segmentation fault #110

Closed rei-vilo closed 3 years ago

rei-vilo commented 3 years ago

I'm trying to run an application built with RasPiArduino.

Summary of results

I've already checked https://stackoverflow.com/questions/59506152/valgrind-reports-hundreds-of-errors-in-hello-world-program-on-raspberrypi-4b about the messages from Valgrind.

The same application built with GDB enabled no longer raises the Segmentation fault error, but weights 4MB instead of 120KB.

Is there something wrong with the GDB disabled option?

Thank you for your help!

Configuration

Valgrind report

==883== Memcheck, a memory error detector ==883== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==883== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==883== Command: ./embeddedcomputing ==883== --883-- WARNING: Serious error when reading debug info --883-- When reading debug info from /lib/arm-linux-gnueabihf/ld-2.28.so: --883-- Ignoring non-Dwarf2/3/4 block in .debug_info --883-- WARNING: Serious error when reading debug info --883-- When reading debug info from /lib/arm-linux-gnueabihf/ld-2.28.so: --883-- Last block truncated in .debug_info; ignoring ==883== Conditional jump or move depends on uninitialised value(s) ==883== at 0x401A5D0: index (in /lib/arm-linux-gnueabihf/ld-2.28.so) ==883== ==883== Conditional jump or move depends on uninitialised value(s) ==883== at 0x401A5D4: index (in /lib/arm-linux-gnueabihf/ld-2.28.so) ==883== ...

rei-vilo commented 3 years ago

Although not very pretty, adding -fno-exceptions solved the issue.

Digging into the code to find the cause of the segmentation fault would be better.