2541 && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) { |
2542 && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) { |
2542 if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { |
2543 if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { |
2543 uintptr_t sp = (uintptr_t)__builtin_frame_address(0); |
2544 uintptr_t sp = (uintptr_t)__builtin_frame_address(0); |
2544 if (sp >= *bottom && sp <= *top) { |
2545 if (sp >= *bottom && sp <= *top) { |
2545 free(str); |
2546 free(str); |
|
2547 fclose(f); |
2546 return true; |
2548 return true; |
2547 } |
2549 } |
2548 } |
2550 } |
2549 } |
2551 } |
2550 |
|
2551 free(str); |
2552 free(str); |
2552 } |
2553 } |
2553 |
2554 fclose(f); |
2554 return false; |
2555 return false; |
2555 } |
2556 } |
2556 |
2557 |
2557 // If the (growable) stack mapping already extends beyond the point |
2558 // If the (growable) stack mapping already extends beyond the point |
2558 // where we're going to put our guard pages, truncate the mapping at |
2559 // where we're going to put our guard pages, truncate the mapping at |