--- Log opened Sun Oct 18 00:00:31 2015 | ||
-!- Netsplit *.net <-> *.split quits: rhythmx, LoneTech, CareBear\, arand, dalias, simoncook, jn__ | 05:02 | |
-!- Netsplit over, joins: rhythmx | 05:05 | |
-!- arand_ is now known as arand | 10:34 | |
andrzejr | _franck_, there may be a bug in elf-loader.c leading to icarus crash. Yesterday we discussed a fix for that, which seems to work. | 10:57 |
---|---|---|
andrzejr | check the channel logs, but basically: | 10:57 |
andrzejr | if (phdr.p_paddr + phdr.p_filesz >= max_paddr) { | 10:58 |
andrzejr | if (shdr.sh_addr + shdr.sh_addr >= max_paddr) { | 10:58 |
andrzejr | (sorry, the second one is wrong, but you get the picture) | 11:00 |
_franck_ | andrzejr: yeah, I read this in the logs. Would be great to have the elf in order to analyze the problem. | 14:00 |
GeneralStupid | olofk: thanks, i will... But why am i using or1200... is this a failure?! | 18:16 |
GeneralStupid | olofk: maybe i should start with a clear fusesoc project :/ | 18:16 |
GeneralStupid | olofk: what does it mean that the core resets if i load a program? | 18:41 |
andrzejr | _franck_, I will ask promach for it next time. But thinking about it the error perfectly matches the symptoms. | 19:20 |
andrzejr | I think the error was triggered by header 2 (dpaste.com/0CQFAXZ) | 19:20 |
andrzejr | start address was within allocated buffer so the buffer was (erroneously) not resized. But the end of that section was beyond the allocated buffer so the program corrupted the heap. Next section triggered realloc, which failed because of memory corruption. | 19:22 |
_franck_ | andrzejr: you're right, the fix you suggested earlier is good | 19:32 |
_franck_ | same thing with section headers | 19:33 |
olofk | andrzejr: Hmm... Did you understand if he was compiling the testcase with musl or newlib? | 19:46 |
andrzejr | olofk, with musl | 19:48 |
andrzejr | after fixing the crash the hello.c program still didn't work so I advised him to try newlib first | 19:49 |
_franck_ | https://github.com/fjullien/orpsoc-cores/commit/45e340d348f6600ac818111d7a5ec40e1ae22802 | 19:50 |
_franck_ | ^ not even compile tested | 19:50 |
_franck_ | andrzejr: this commit should have your name on it ;) | 19:51 |
andrzejr | make it public domain :-) | 19:51 |
-!- jn___ is now known as jn__ | 20:04 | |
olofk | andrzejr: Yeah. Musl won't work. musl programs need to be run under linux | 20:10 |
olofk | Where is that hello.c btw? I want to try it here | 20:10 |
olofk | Oh, I guess it's just a hello world | 20:10 |
olofk | yep. That triggers the bug | 20:11 |
olofk | And applyinh the patch makes the program load, even though it won't do anything of course | 20:15 |
olofk | Feel free to commit it to orpsoc-cores | 20:17 |
_franck_ | ok great, I'll do that | 20:18 |
_franck_ | done | 20:21 |
olofk | cool. Thanks | 20:22 |
olofk | FuseSoC now aborts when it runs scripts with an exit code != 0 | 20:38 |
olofk | At least for simulations | 20:39 |
olofk | Turned out that the stuff for FPGA builds use an different code path. Need to do some refactoring | 20:39 |
olofk | I'm getting closer to just deprecating the .system files and move everything to .core | 20:39 |
olofk | How come shell scripts are so incredibly hard to understand? | 20:47 |
olofk | Alright. Now FuseSoC breaks with a friendly error message if elf-loader can't find gelf.h | 20:54 |
olofk | Could probably add a few more of those checks in orpsoc-cores | 20:54 |
--- Log closed Mon Oct 19 00:00:32 2015 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!