Messages in this thread | | | Date | Tue, 22 Apr 2008 13:09:17 -0500 | From | Eric Sandeen <> | Subject | Re: [PATCH] Fix max-stack calculators to skip canary |
| |
Joe Perches wrote:
> Wouldn't it be better to have exactly the same code? > How about using a statement expression macro? > > #define DEBUG_STACK_FREE(process) \ > ({ \ > unsigned long *n = end_of_stack(process); \ > do { /* Skip over canary */\ > n++; \ > } while (!*n); \ > (unsigned long)n - (unsigned long)end_of_stack(process); \ > }) >
That'd probably be good although I don't think we like macros anymore :)
-Eric
| |