qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 09/14] tests/tcg: add HeapInfo checking to semihosting tes


From: Richard Henderson
Subject: Re: [PATCH v1 09/14] tests/tcg: add HeapInfo checking to semihosting test
Date: Sat, 20 Mar 2021 10:11:38 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/20/21 7:37 AM, Alex Bennée wrote:
+    if (info.heap_base == NULL || info.heap_limit == NULL) {
+        printf("null heap: %p -> %p\n", info.heap_base, info.heap_limit);
+        exit(1);
+    } else if (info.heap_base != NULL && info.heap_limit != NULL) {

Useless inversion of first test?

+    if (info.stack_base == NULL) {
+        printf("null stack: %p -> %p\n", info.stack_base, info.stack_limit);
+        exit(3);
+    } else if (info.stack_base != NULL && info.stack_limit != NULL) {

So... we're expecting stack_limit unset is valid?

Perhaps a check that stack and heap do not intersect?
Perhaps a check that &info is within the stack bounds?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]