Rodrigo Arias
0df018cf5f
The check_clock_gate() was trying to access to the first event in all streams. However, streams that are empty don't have any event, so they cause a NULL dereference. Skipping not active streams avoids the problem.
20 lines
338 B
C
20 lines
338 B
C
/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
|
|
* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
|
|
#include <ovni.h>
|
|
#include "instr.h"
|
|
|
|
/* Create a trace where a stream doesn't contain any event */
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
instr_start(0, 1);
|
|
|
|
/* Don't flush the thread to create an empty stream */
|
|
|
|
ovni_proc_fini();
|
|
|
|
return 0;
|
|
}
|