(/home/sate/Testcases/c/cve/wireshark-1.2.0/capture_sync.c) |
| |
| 1246 | | | sync_pipe_wait_for_child(capture_options *capture_opts) |
| 1247 | | | { |
| 1248 | | | int wstatus; |
| 1249 | | | |
| 1250 | | | |
| 1251 | | | g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "sync_pipe_wait_for_child: wait till child closed"); |
| 1252 | | | g_assert(capture_opts->fork_child != -1);
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
74 | #define g_assert(expr) do { if G_LIKELY (expr) ; else \ |
75 | g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ |
76 | #expr); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
277 | #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
268 | #define _G_BOOLEAN_EXPR(expr) \ |
269 | __extension__ ({ \ |
270 | int _g_boolean_var_; \ |
271 | if (expr) \ |
272 | _g_boolean_var_ = 1; \ |
273 | else \ |
274 | _g_boolean_var_ = 0; \ |
275 | _g_boolean_var_; \ |
276 | }) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
Event 2:
Taking true branch. capture_opts->fork_child != -1 evaluates to true.
hide
Event 3:
Skipping " if". __builtin_expect(...) evaluates to true.
hide
Event 4:
Leaving loop. 0 evaluates to false.
hide
|
|
| 1253 | | | |
| 1254 | | | #ifdef _WIN32 |
| 1255 | | | if (_cwait(&wstatus, capture_opts->fork_child, _WAIT_CHILD) == -1) { |
| 1256 | | | report_failure("Child capture process stopped unexpectedly (errno:%u)", |
| 1257 | | | errno); |
| 1258 | | | } |
| 1259 | | | #else |
| 1260 | | | if (wait(&wstatus) != -1) { |
Event 5:
Taking true branch. wait(...) != -1 evaluates to true.
hide
|
|
| 1261 | | | if (WIFEXITED(wstatus)) {
x /usr/include/sys/wait.h |
| |
85 | # define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) |
| |
x /usr/include/bits/waitstatus.h |
| |
38 | #define __WIFEXITED(status) (__WTERMSIG(status) == 0) |
| |
x /usr/include/bits/waitstatus.h |
| |
32 | #define __WTERMSIG(status) ((status) & 0x7f) |
| |
x /usr/include/sys/wait.h |
| |
46 | # define __WAIT_INT(status) \ |
47 | (__extension__ (((union { __typeof(status) __in; int __i; }) \ |
48 | { .__in = (status) }).__i)) |
| |
|
| |