Weird crashes in the core(s)

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Weird crashes in the core(s)

Postby CocoaGeek » Wed Jul 26, 2017 1:39 am

Hello,

I'm running into some weird behaviour when I try to use some function from libc and libm. I have been pulling my hair out trying to figure it out and I can't. It probably have something to do with the shared memory usage, but I dunno ... :(

Basically, the following code will work:

Code: Select all
float lValue = expf(1.23f);


this one too:

Code: Select all
float lValue = eRand(&lRSeed);


but this won't:

Code: Select all
real32 lValue = expf(eRand(&lRSeed));


and neither will this:

Code: Select all
float lValue2 = eRand(&lRSeed);
float lValue3 = expf(lValue2);


The eRand function is the following:

Code: Select all
float eRand(uint* aSeed)
{
    return (float)rand_r(aSeed) / (float)RAND_MAX;
}


Any suggestion welcomed :oops:
CocoaGeek
 
Posts: 29
Joined: Thu Apr 13, 2017 3:56 am

Re: Weird crashes in the core(s)

Postby CocoaGeek » Wed Jul 26, 2017 2:15 am

Ok, shifted the location of my shared data to 0x8f000000 and it seems to work now ... I'm an idiot :oops:
CocoaGeek
 
Posts: 29
Joined: Thu Apr 13, 2017 3:56 am


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 4 guests

cron