diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-06 09:15:28 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-06 09:15:28 +0000 |
| commit | d0af66c2d76056b173294fc81cdfc47305e4e2a7 (patch) | |
| tree | 04414c325574a99bc3cd3f1f354786f1b24f06de /results/classifier/111/semantic/1798659 | |
| parent | 140a79ffee69434ba0fbfde4cefb9fe5e82d93b4 (diff) | |
| download | emulator-bug-study-d0af66c2d76056b173294fc81cdfc47305e4e2a7.tar.gz emulator-bug-study-d0af66c2d76056b173294fc81cdfc47305e4e2a7.zip | |
add new results
Diffstat (limited to 'results/classifier/111/semantic/1798659')
| -rw-r--r-- | results/classifier/111/semantic/1798659 | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/results/classifier/111/semantic/1798659 b/results/classifier/111/semantic/1798659 new file mode 100644 index 00000000..6cd5bbae --- /dev/null +++ b/results/classifier/111/semantic/1798659 @@ -0,0 +1,69 @@ +semantic: 0.330 +other: 0.193 +graphic: 0.093 +PID: 0.061 +vnc: 0.051 +device: 0.051 +socket: 0.036 +files: 0.036 +debug: 0.032 +network: 0.028 +performance: 0.027 +boot: 0.026 +permissions: 0.025 +KVM: 0.010 +semantic: 0.310 +KVM: 0.179 +files: 0.158 +debug: 0.130 +performance: 0.046 +other: 0.044 +PID: 0.022 +device: 0.020 +network: 0.020 +permissions: 0.017 +vnc: 0.015 +boot: 0.015 +socket: 0.012 +graphic: 0.012 + +Replace comma with semicolon in trace/simple.c + +In the master branch in trace/simple.c in writeout_thread (https://github.com/qemu/qemu/blob/master/trace/simple.c#L174) we currently have: + dropped.rec.length = sizeof(TraceRecord) + sizeof(uint64_t), + dropped.rec.pid = trace_pid; + +It seems to me like a typo that the first line ends with a comma. +Currently this causes no harm, but I think this should be fixed. + +It's perfect valid C to terminate a statement with "," instead of ";" - it just has a different meaning. Consider this: + +#include <stdio.h> + +int main() +{ + if (0) + printf("Hello!\n"), + + printf("Good bye!\n"); + + return 0; +} + +At a first glance, you'd expect this program to print "Good bye!" - but it does not. Actually, the "," is used here to put the two printf statements into the same block, so this program is the same as: + + if (0) { + printf("Hello!\n"); + printf("Good bye!\n"); + } + +Thus, there is no real bug in simple.c here, but of course it would be better style to clean this up and use ";" instead. + +By the way, two lines earlier there is another line ending in ",": + + dropped.rec.event = DROPPED_EVENT_ID, + +Fixed in commit 7ff5920717d413d8b7c3ba13d9, which will be in the upcoming 4.0 release. + + + |
