Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

[CrashReproducer] Handle indexing turned on with CLANG_PROJECT_INDEX_PATH. #354

Open
wants to merge 1 commit into
base: upstream-with-swift
Choose a base branch
from

Conversation

vsapsai
Copy link
Contributor

@vsapsai vsapsai commented Sep 3, 2019

Crash reproducer is checking the driver's arguments for
-index-store-path and in case of the environment variable, this
argument is absent. So the generated reproducer incorrectly won't run
the indexer.

Fix by checking the arguments of the failed -cc1 command for
-index-store-path.

rdar://problem/48830606

…PATH.

Crash reproducer is checking the driver's arguments for
`-index-store-path` and in case of the environment variable, this
argument is absent. So the generated reproducer incorrectly won't run
the indexer.

Fix by checking the arguments of the failed -cc1 command for
`-index-store-path`.

rdar://problem/48830606
@jkorous-apple
Copy link
Contributor

@swift-ci please test

@jkorous-apple
Copy link
Contributor

@vsapsai just wondering - how do we handle other environment variables in reproducers? Strictly speaking this isn't a 100% accurate reproducer (although for all practical purposes it shouldn't matter).

@vsapsai
Copy link
Contributor Author

vsapsai commented Sep 3, 2019

@vsapsai just wondering - how do we handle other environment variables in reproducers? Strictly speaking this isn't a 100% accurate reproducer (although for all practical purposes it shouldn't matter).

Good question. Need to double check but my impression is that the reproducer contains -cc1 options and environment variables are handled by the driver. So all the extra stuff the driver has added should be preserved. But -index-store-path is special because we don't preserve its value verbatim but change to a different one in the reproducer directory. That's how it slipped through the cracks.

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

Successfully merging this pull request may close these issues.

2 participants