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

SwiftShader: Segfault #9

Open
Jack-Clark opened this issue Apr 8, 2022 · 7 comments
Open

SwiftShader: Segfault #9

Jack-Clark opened this issue Apr 8, 2022 · 7 comments

Comments

@Jack-Clark
Copy link
Collaborator

Jack-Clark commented Apr 8, 2022

I think this is allowed, but @vili-1 can you confirm that a loop header can be its own continue target? See the CFG below.

Executing amber -t spv1.3 -v 1.1 reduced-segfault.amber leads to a segfault. I think this may be related to #8 as both seem to rely on there being input variable accesses in a selection header followed by a loop header.

I have attached an archive containing the files.

Segfault

@vili-1
Copy link
Collaborator

vili-1 commented Apr 8, 2022

Yes @Jack-Clark , a loop header can be its own continue target (this example is allowed - SHO is Entry). About the segfault I have to dig a bit into this.

@vili-1
Copy link
Collaborator

vili-1 commented Apr 8, 2022

@Jack-Clark, I don't get segfault in my Mac

Summary: 1 pass, 0 fail

@Jack-Clark
Copy link
Collaborator Author

Great, thanks for confirming this. Regarding the segfault, dId you use SwiftShader or moltenVK?

@vili-1
Copy link
Collaborator

vili-1 commented Apr 8, 2022

MoltenVK

$ ./amber -d -V
Amber        : d8acae6
SPIRV-Tools  : 97f1d485
SPIRV-Headers: dc77030
GLSLang      : 07a55839
Shaderc      : 821d564

Physical device properties:
  apiVersion: 1.1.170
  driverVersion: 10102
  vendorID: 32902
  deviceID: 35411
  deviceType: integrated gpu
  deviceName: Intel(R) Iris(TM) Plus Graphics
  driverName: MoltenVK
  driverInfo: 1.1.2
End of physical device properties.

@vili-1
Copy link
Collaborator

vili-1 commented Apr 10, 2022

As stated in #8, we get an error when the node in the fleshing path is both a switch case and merge block of the switch and further, the switch is the head of the path. The successful execution that I mentioned above was using a fleshing path other than this. Maybe we have a chat with @afd at some point to clarify this (not clear to me at the moment).

@vili-1
Copy link
Collaborator

vili-1 commented Apr 11, 2022

Loading the SwiftShader I get no error!
issue9

@Jack-Clark
Copy link
Collaborator Author

Jack-Clark commented Apr 11, 2022

Hmmm, which commit are you using for SwiftShader? I installed SwiftShader on my desktop (using the commit in the original post) and could reproduce the segfault.

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

No branches or pull requests

2 participants