-
Notifications
You must be signed in to change notification settings - Fork 2
Feature: Detect Uninitialized Variables Uses #678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
665d149 to
77c5f4f
Compare
526f163 to
aff5dfb
Compare
21df82e to
55396eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds uninitialized variable detection to the Glu compiler through a new GIL optimization pass. The pass tracks memory initialization states across control flow to catch uses of uninitialized variables at compile time.
- Implements a
DetectUninitializedPassthat performs dataflow analysis to track memory initialization states - Refactors
glu_createConstantStringto use aggregate initialization syntax - Adds comprehensive functional tests covering various control flow scenarios
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
lib/Optimizer/GILPasses/DetectUninitializedPass.cpp |
New pass implementation with dataflow analysis for tracking uninitialized memory |
stdlib/defaultImports/stringType.glu |
Refactored to use aggregate initialization syntax |
test/functional/run/use_unitialized_var.glu |
Comprehensive test suite with multiple control flow scenarios |
lib/Optimizer/CMakeLists.txt |
Adds new pass to build system |
include/Optimizer/GILPasses.def |
Registers new pass in pass manager |
3f63d0f to
103860f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Snowy1803
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's some magic that I can't understand
033afdc to
38a2547
Compare
Closes: #488