Skip to content

[MINOR][VL] Use resize() instead of reserve() in getEmitInfo#11623

Open
acvictor wants to merge 1 commit intoapache:mainfrom
acvictor:acvictor/fixReserveOperatorUB
Open

[MINOR][VL] Use resize() instead of reserve() in getEmitInfo#11623
acvictor wants to merge 1 commit intoapache:mainfrom
acvictor:acvictor/fixReserveOperatorUB

Conversation

@acvictor
Copy link
Contributor

What changes are proposed in this pull request?

This PR replaces reserve() with resize() for projectNames and expressions vectors in getEmitInfo(). std::vector::reserve() allocates capacity but does not change size(). The subsequent loop assigns elements via operator[] which accesses indices beyond size() and this is undefined behaviour.

How was this patch tested?

Existing tests.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the VELOX label Feb 17, 2026
@acvictor acvictor marked this pull request as ready for review February 17, 2026 08:55
@acvictor
Copy link
Contributor Author

@rui-mo can you please review this minor change? Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant