Discussion:
[avr-libc-dev] Incorrect check in test stdlib/malloc-7.c?
Pitchumani Sivanupandi
2016-02-16 11:50:43 UTC
Permalink
Hi Joerg,

Test stdlib/malloc-7.c is failed in my regression test. I feel last check is
incorrect in that test case. Free list pointer (__flp) is expected to be NULL,
but the test checks next pointer of __flp.

Attached the patch. Could you please confirm?

Regards,
Pitchumani

--- a/avr-libc/tests/simulate/stdlib/malloc-7.c
+++ b/avr-libc/tests/simulate/stdlib/malloc-7.c
@@ -89,7 +89,7 @@ int main(void)
free(ptrs[2]);
_MemoryBarrier();
/* ...and again. */
- if (__flp->nx != NULL) return __LINE__;
+ if (__flp != NULL) return __LINE__;
if ((char *)(ptrs[1]) - 2 != __brkval) return __LINE__;

return 0;

Loading...