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

Read preprocessed code into buffer before parsing #2387

Merged

Conversation

adamjseitz
Copy link
Contributor

@adamjseitz adamjseitz commented Jan 11, 2023

This change resolves a race condition that existed where the parser may close the preprocessor's output pipe, causing it to terminate. Souffle would then see the process terminated unsuccessfully, and and throw an exception instead of printing information about the parsing error.

Closes #2386

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #2387 (b69ab2e) into master (0334b07) will increase coverage by 0.07%.
The diff coverage is 85.48%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2387      +/-   ##
==========================================
+ Coverage   77.56%   77.63%   +0.07%     
==========================================
  Files         467      472       +5     
  Lines       30785    31042     +257     
==========================================
+ Hits        23877    24100     +223     
- Misses       6908     6942      +34     
Impacted Files Coverage Δ
src/parser/ParserDriver.h 100.00% <ø> (ø)
.../ast/transform/SimplifyConstantBinaryConstraints.h 50.00% <50.00%> (ø)
src/MainDriver.cpp 70.39% <70.27%> (+0.15%) ⬆️
src/parser/scanner.ll 78.01% <76.92%> (+5.49%) ⬆️
tests/libsouffle_interface/vfs_overlay_test.cpp 85.93% <85.93%> (ø)
src/parser/SrcLocation.cpp 91.86% <87.50%> (+7.24%) ⬆️
src/parser/ParserDriver.cpp 89.44% <88.33%> (-0.39%) ⬇️
src/parser/VirtualFileSystem.cpp 88.37% <88.37%> (ø)
...st/transform/SimplifyConstantBinaryConstraints.cpp 100.00% <100.00%> (ø)
src/parser/SrcLocation.h 100.00% <100.00%> (ø)
... and 8 more

@adamjseitz adamjseitz marked this pull request as ready for review January 11, 2023 22:54
src/MainDriver.cpp Outdated Show resolved Hide resolved
src/MainDriver.cpp Outdated Show resolved Hide resolved
src/MainDriver.cpp Outdated Show resolved Hide resolved
src/MainDriver.cpp Show resolved Hide resolved
src/parser/ParserDriver.cpp Outdated Show resolved Hide resolved
This change resolves a race condition that existed where the parser may
close the preprocessor's output pipe, causing it to terminate. Souffle
would then see the process terminated unsuccessfully, and and throw an
exception instead of printing information about the parsing error.
@quentin quentin merged commit 30df8ff into souffle-lang:master Feb 8, 2023
@quentin
Copy link
Member

quentin commented Feb 8, 2023

Thanks for the contribution !

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.

Race condition suppresses helpful parse error messages
2 participants