Skip to content
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

cgen: fix g.obf_table data missing(fix #19695) #19778

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

shove70
Copy link
Contributor

@shove70 shove70 commented Nov 6, 2023

This PR fixed g.obf_table data missing(fix #19695)

fn add(a int, b int) int {
	return a + b
}

fn main() {
	println(add(1, 3))
}
/* obf: main.add */
VV_LOCAL_SYMBOL int _f0(int a, int b) {
	int _t1 = (int)(a + b);
	return _t1;
}

VV_LOCAL_SYMBOL void main__main(void) {
	println(int_str(/* obf call: main.add */_f0(1, 3)));
}
v -obf run a.v

outputs:

4

@shove70 shove70 marked this pull request as ready for review November 6, 2023 03:59
@medvednikov medvednikov merged commit 1e25d45 into vlang:master Nov 6, 2023
54 checks passed
@medvednikov
Copy link
Member

Thanks! Ideally we need a small one line CI test with -obf too, I'll add it.

@shove70 shove70 deleted the obf branch November 6, 2023 11:01
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.

"obf name not found, this should never happen" when build with obfuscation enabled
2 participants