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

Chopper builds wrong ModSetMap when dealing with field-sensitive nodes #42

Open
jordr opened this issue Mar 18, 2020 · 4 comments
Open
Labels
bug Something isn't working upstream

Comments

@jordr
Copy link
Owner

jordr commented Mar 18, 2020

See https://gist.github.com/jordr/55817398f88255dedfe206dd8337dba1

@jordr jordr added bug Something isn't working upstream labels Mar 18, 2020
@jordr jordr changed the title Chopper breaks --posix-runtime Chopper builds wrong ModSetMap when dealing with field-sensitive nodes Mar 30, 2020
@jordr
Copy link
Owner Author

jordr commented Mar 30, 2020

David points to PSPA's mayDepend to fix this issue:

https://github.com/davidtr1037/chopper-pspa/blob/0d78f18afe72b99caa23ea7f6ba8cb63a1e5e933/lib/Core/Executor.cpp#L5593-L5611

Debugging commit: 4ac124c

STORE: {
	location =   %x.addr = alloca i8*, align 8,
	instruction =   store i8* %x, i8** %x.addr, align 8
	ValueNodeID = 60,
	ptsto = [		61(insensitive), ]
}
objToStoreMap[foo, 61] =   store i8* %x, i8** %x.addr, align 8
STORE: {
	location = @off = global i32 0, align 4,
	instruction =   store i32 %inc, i32* @off, align 4, !dbg !208
	ValueNodeID = 4,
	ptsto = [		5(insensitive), ]
}
objToStoreMap[foo, 5] =   store i32 %inc, i32* @off, align 4, !dbg !208
STORE: {
	location =   %arrayidx1 = getelementptr inbounds i8* %3, i64 0, !dbg !208,
	instruction =   store i8 %2, i8* %arrayidx1, align 1, !dbg !208
	ValueNodeID = 71,
	ptsto = [		132(sensitive, FIObjNode = 104), ]
}
...

function = foo
	-modPts: 5	-modPts: 61	-modPts: 132
	-refPts: 1	-refPts: 5	-refPts: 9	-refPts: 79	-refPts: 98	-refPts: 104
modSet of foo, 5 =
	-  store i32 %inc, i32* @off, align 4, !dbg !208

@jordr
Copy link
Owner Author

jordr commented Mar 30, 2020

jordr added a commit that referenced this issue Mar 30, 2020
@jordr
Copy link
Owner Author

jordr commented Apr 2, 2020

Should be fixed by d85e634

jordr added a commit that referenced this issue Apr 3, 2020
@jordr
Copy link
Owner Author

jordr commented Apr 11, 2020

This also needs ref-set info. See d85e634

But what happens if the mod-set contains a field-insensitive object, and the ref-set contains a field-sensitive version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

1 participant