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

Mapping is broken when object part is mapped together with unrelated parts #50885

Closed
jdoerfert opened this issue Aug 19, 2021 · 2 comments
Closed
Labels
bugzilla Issues migrated from bugzilla invalid Resolved as invalid, i.e. not a bug openmp

Comments

@jdoerfert
Copy link
Member

Bugzilla Link 51543
Resolution INVALID
Resolved on Aug 19, 2021 11:27
Version unspecified
OS Linux
Attachments reproducer
CC @alexey-bataev,@grokos,@jdenny-ornl,@jprotze

Extended Description

I was playing around with an example and I fail to understand the behavior, consequently I suspect a bug.

The test.cpp file attached shows 3 target regions. All execute 1 loop iteration and write a value into an array of size 1.
Only, the middle one uses a member of the previously mapped object.
While that should not influence the array of size 1, IMHO, it seems to do for some reason.

I see Broken: 0x0 but I would expect Broken: 0x7.

@jprotze
Copy link
Collaborator

jprotze commented Aug 19, 2021

Is alloc supposed to initialize the mapped this?
I think, n_ is not initialized - or initialized to 0 by the alloc. Since the object is already mapped and reference count is > 0, n_ is not mapped for the target regions.

If I either remove the mapping of this or change to map(to:,... the code works as expected.

@jdoerfert
Copy link
Member Author

n_ was not initialized. My bad. Thanks Joachim!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla invalid Resolved as invalid, i.e. not a bug openmp
Projects
None yet
Development

No branches or pull requests

2 participants