Stack-only checker skips any conditional blocks

RESOLVED FIXED in mozilla1.9.1b1

Status

()

Core
Rewriting and Analysis
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Benjamin Smedberg, Assigned: Benjamin Smedberg)

Tracking

Trunk
mozilla1.9.1b1
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

9 years ago
Created attachment 336530 [details] [diff] [review]
Walk stack conditionals correctly, rev. 1

I found out, to my horror, that the current stack-only checker completely skips conditional blocks. This is because, by the time we hit gimplification and the CFG pass, the COND_EXPR if/else blocks are empty (see bug 451412).

Instead, I am now running this at the process_cp_pre_genericize level, which actually makes the analysis easier. There will be a dehydra patch and a mozilla patch.
Attachment #336530 - Flags: review?(dmandelin)
(Assignee)

Comment 1

9 years ago
Created attachment 336531 [details] [diff] [review]
Push BIND_EXPR declarations onto the walk stack, rev. 1

This pushes BIND_EXPR trees onto the walk stack without actually walking them, in order that I can look "up" the stack to see that the current expression was assigned to the BIND_EXPR. This seems a little hacky, but frankly all of walk_tree seems that way.
Attachment #336531 - Flags: review?(dmandelin)

Comment 2

9 years ago
Comment on attachment 336531 [details] [diff] [review]
Push BIND_EXPR declarations onto the walk stack, rev. 1

walk_tree is a  direct translation of the C++ code + some sugar such as the stack. I'll accept patches to make it use yield and stuff.
Attachment #336531 - Flags: review?(dmandelin) → review+
(Assignee)

Updated

9 years ago
Blocks: 437502
Attachment #336530 - Flags: review?(dmandelin) → review+
(Assignee)

Comment 3

9 years ago
Pushed mozilla-central: http://hg.mozilla.org/mozilla-central/rev/cb6360b08af9
dehydra: http://hg.mozilla.org/users/tglek_mozilla.com/dehydra-gcc/rev/4fc93e283d6a
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.