Skip to content

Don't check for \\ No newline at end of file\n if it can't exist#908

Merged
implausible merged 1 commit into
masterfrom
fix-segfault-convenient-patch
Feb 18, 2016
Merged

Don't check for \\ No newline at end of file\n if it can't exist#908
implausible merged 1 commit into
masterfrom
fix-segfault-convenient-patch

Conversation

@implausible
Copy link
Copy Markdown
Member

If content isn't greater than 29, don't search for the no newline token. This lead to segfaults on linux. Interestingly, this did not affect most OSX and Windows machines. Some sort of compiler-saving-of-the-day?? No clue.

@implausible implausible force-pushed the fix-segfault-convenient-patch branch 2 times, most recently from 044c9cf to 5d11745 Compare February 18, 2016 16:36
@implausible implausible force-pushed the fix-segfault-convenient-patch branch from 5d11745 to 59ecdf0 Compare February 18, 2016 16:37
implausible added a commit that referenced this pull request Feb 18, 2016
Don't check for \\ No newline at end of file\n if it can't exist
@implausible implausible merged commit 42df674 into master Feb 18, 2016
@johnhaley81 johnhaley81 deleted the fix-segfault-convenient-patch branch February 18, 2016 17:28
@tbranyen
Copy link
Copy Markdown
Member

Magic number? Would it be possible to document that somewhere in the code?

@johnhaley81
Copy link
Copy Markdown
Collaborator

@implausible is it 29 because that's the length of this string?

@tbranyen
Copy link
Copy Markdown
Member

That makes way more sense, at least we know it's not magic.

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