Skip to content

Conversation

PhilArmstrong
Copy link
Contributor

Small memory read error found whilst fuzzing another application that uses the Swift Markup parser.

@CodaFi
Copy link
Contributor

CodaFi commented May 11, 2018

Fix LGTM, do you have a test case?

@PhilArmstrong
Copy link
Contributor Author

Not for Swift. I'll see if I can come up with something - I think it should be triggered by parsing "///\n" under ASAN though.

@PhilArmstrong
Copy link
Contributor Author

Can you suggest a way to get any of the command line tools to parse the doc comments? I can't seem to find a way to do it.

@CodaFi
Copy link
Contributor

CodaFi commented May 14, 2018

I believe test/SourceKit/MarkupXML/basic.swift wanders its way through this code path. If not, trace your way out from the Markdown parser to the requisite SourceKit request (here it's markup-xml) and search for related tests.

@PhilArmstrong
Copy link
Contributor Author

PhilArmstrong commented May 15, 2018

If you run the tests with ASAN compiled binaries then the existing test file: test/IDE/comment_brief.swift will trigger this bug.

(It does so when I run the test command from the lit file at the command line at least.)

@PhilArmstrong
Copy link
Contributor Author

PhilArmstrong commented May 15, 2018

As will any documentation on a function that looks like:

\\\
func greet(person: String) -> String {
...

@CodaFi
Copy link
Contributor

CodaFi commented May 15, 2018

Then let’s give this a go

@swift-ci please ASAN test

@CodaFi
Copy link
Contributor

CodaFi commented May 19, 2018

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 54e652f into swiftlang:master May 19, 2018
@PhilArmstrong PhilArmstrong deleted the PhilArmstrong-patch-1 branch May 20, 2018 13:50
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.

3 participants