Skip to content

Commit aeb4098

Browse files
committed
[#81064] Fix bug causing endless iteration
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
1 parent 714d927 commit aeb4098

7 files changed

Lines changed: 7 additions & 1 deletion

File tree

source/SvBugpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bool lineRemover(const std::string& stageName, const std::string& passIdx, SvBug
133133
size_t fileSize = st.st_size;
134134
if (fileSize == 0) {
135135
close(fd);
136-
return true;
136+
return false;
137137
}
138138

139139
char* data =

tests/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ test_short_exit1:
4646
test_short_grep:
4747
@./run_test short_grep checkgrep.sh ${INPUT_DIR}/short_in.sv
4848

49+
.PHONY: test_empty
50+
test_empty:
51+
@timeout 15s ./run_test empty checkexit0.sh ${INPUT_DIR}/short_in/empty.sv
52+
4953
.PHONY: test_comment_dir
5054
test_comment_dir:
5155
@./run_test comment_dir checkverilator_run.sh ${INPUT_DIR}/comment_dir_in.sv

tests/golden/empty/debug/trace

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pass stage lines_removed committed time idx type_info input_file
2+
- dryRun 0 1 1ms 0 - empty.sv

tests/golden/empty/minimized/empty.sv

Whitespace-only changes.

tests/golden/empty/sv-bugpoint-combined.sv

Whitespace-only changes.

tests/golden/empty/tmp/empty.sv

Whitespace-only changes.

tests/input_files/short_in/empty.sv

Whitespace-only changes.

0 commit comments

Comments
 (0)