IRC logs for #openrisc Sunday, 2015-10-18

--- 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: rhythmx05:05
-!- arand_ is now known as arand10: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
andrzejrcheck the channel logs, but basically:10:57
andrzejrif (phdr.p_paddr + phdr.p_filesz >= max_paddr) {10:58
andrzejrif (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
GeneralStupidolofk: thanks, i will... But why am i using or1200... is this a failure?!18:16
GeneralStupidolofk: maybe i should start with a clear fusesoc project :/18:16
GeneralStupidolofk: 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
andrzejrI think the error was triggered by header 2 (dpaste.com/0CQFAXZ)19:20
andrzejrstart 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 good19:32
_franck_same thing with section headers19:33
olofkandrzejr: Hmm... Did you understand if he was compiling the testcase with musl or newlib?19:46
andrzejrolofk, with musl19:48
andrzejrafter fixing the crash the hello.c program still didn't work so I advised him to try newlib first19:49
_franck_https://github.com/fjullien/orpsoc-cores/commit/45e340d348f6600ac818111d7a5ec40e1ae2280219:50
_franck_^ not even compile tested19:50
_franck_andrzejr: this commit should have your name on it ;)19:51
andrzejrmake it public domain :-)19:51
-!- jn___ is now known as jn__20:04
olofkandrzejr: Yeah. Musl won't work. musl programs need to be run under linux20:10
olofkWhere is that hello.c btw? I want to try it here20:10
olofkOh, I guess it's just a hello world20:10
olofkyep. That triggers the bug20:11
olofkAnd applyinh the patch makes the program load, even though it won't do anything of course20:15
olofkFeel free to commit it to orpsoc-cores20:17
_franck_ok great, I'll do that20:18
_franck_done20:21
olofkcool. Thanks20:22
olofkFuseSoC now aborts when it runs scripts with an exit code != 020:38
olofkAt least for simulations20:39
olofkTurned out that the stuff for FPGA builds use an different code path. Need to do some refactoring20:39
olofkI'm getting closer to just deprecating the .system files and move everything to .core20:39
olofkHow come shell scripts are so incredibly hard to understand?20:47
olofkAlright. Now FuseSoC breaks with a friendly error message if elf-loader can't find gelf.h20:54
olofkCould probably add a few more of those checks in orpsoc-cores20: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!