Skip to content

Conversation

@yunsecode
Copy link
Contributor

Closes: #488

@yunsecode yunsecode self-assigned this Oct 23, 2025
@yunsecode yunsecode force-pushed the feature/gilpass/detect-uninitialized-pass branch from 665d149 to 77c5f4f Compare November 6, 2025 14:45
@yunsecode yunsecode marked this pull request as ready for review November 6, 2025 20:48
@yunsecode yunsecode force-pushed the feature/gilpass/detect-uninitialized-pass branch from 526f163 to aff5dfb Compare November 6, 2025 20:54
@Snowy1803 Snowy1803 changed the title Feature/gilpass/detect uninitialized pass Feature: Detect Uninitialized Variables Uses Nov 7, 2025
@yunsecode yunsecode force-pushed the feature/gilpass/detect-uninitialized-pass branch from 21df82e to 55396eb Compare November 7, 2025 15:23
@yunsecode yunsecode requested a review from Copilot November 7, 2025 15:36
Copy link
Contributor

Copilot AI left a 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 DetectUninitializedPass that performs dataflow analysis to track memory initialization states
  • Refactors glu_createConstantString to 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

@yunsecode yunsecode requested a review from Copilot November 7, 2025 16:24
@yunsecode yunsecode force-pushed the feature/gilpass/detect-uninitialized-pass branch from 3f63d0f to 103860f Compare November 7, 2025 16:29
Copy link
Contributor

Copilot AI left a 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.

@yunsecode yunsecode requested a review from Copilot November 7, 2025 16:50
Copy link
Contributor

Copilot AI left a 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
Snowy1803 previously approved these changes Nov 7, 2025
Copy link
Contributor

@Snowy1803 Snowy1803 left a 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

@Snowy1803 Snowy1803 force-pushed the feature/gilpass/detect-uninitialized-pass branch from 033afdc to 38a2547 Compare November 14, 2025 21:15
@Snowy1803 Snowy1803 added this pull request to the merge queue Nov 14, 2025
Merged via the queue into main with commit c9db0dd Nov 14, 2025
6 checks passed
@Snowy1803 Snowy1803 deleted the feature/gilpass/detect-uninitialized-pass branch November 14, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GIL Pass: Detect Use of Uninitialized Variables

3 participants