embench / embench-iot

The main Embench repository
https://www.embench.org/
GNU General Public License v3.0
254 stars 104 forks source link

Tarfind: fix heap size to be multiple of the pointer size #146

Closed hirooih closed 2 years ago

hirooih commented 2 years ago

The fix #138 requires that the heap size must be multiple of the pointer size. The heap size of tarfind.c was 8995. As the result malloc() failed.

An assertion check was added on init_heap_beebs. No other benchmarks failed.

jeremybennett commented 2 years ago

@hirooih Thanks for this. I've taken a quick look. One small change is that we don't like assertions - they can have unpredictable behavior. We should just fail the test if this occurs.

I've asked @PaoloS02 to review in detail.

I hope you will be able to join the monthly Embench call tomorrow (Monday 18 October) at 08:00 Pacific Time. Details on the mailing list here.

hirooih commented 2 years ago

@jeremybennett Thank you for your replies. I'm in Japan, it is Monday morning now. I have to start working, so I will reply them in this evening.

hirooih commented 2 years ago

One small change is that we don't like assertions - they can have unpredictable behavior. We should just fail the test if this occurs.

I see. I will send a fix. BTW shall I simply call exit(1)? And shall call printf() with some message? I have no idea which functions we can call in Embench.

I've asked @PaoloS02 to review in detail.

But you already merged my PR. Wasn't it intentional? I will open another PR for the above fix.

I hope you will be able to join the monthly Embench call tomorrow (Monday 18 October) at 08:00 Pacific Time.

Thank you for inviting me. It is an honor for me.