Lumiera  0.pre.03
»edit your freedom«
vgsuppression.c File Reference

Go to the source code of this file.

Description

dummy executable to generate valgrind suppressions.

When running code under valgrind to detect memory leaks, typically a well known set of false alarms will be reported. The reason is that some facilities, either implemented by our own or from third party libraries, just choose never to free some working buffers. To deal with this well known issue, valgrind allows to be "primed" with a specifically crafted executable, which deliberately triggers just these false memory leak alarms.

Definition in file vgsuppression.c.

#include "lib/tmpbuf.h"
#include <stdint.h>

Typedefs

typedef const char * lumiera_err
 

Functions

lumiera_err lumiera_error (void)
 Get and clear current error state. More...
 
struct lumiera_errorcontext_structlumiera_error_get (void)
 
lumiera_err lumiera_error_set (lumiera_err, const char *)
 Set error state for the current thread. More...
 
int main ()
 

Function Documentation

◆ lumiera_error_set()

lumiera_err lumiera_error_set ( lumiera_err  ,
const char *   
)

Set error state for the current thread.

If the error state of the current thread was cleared, then set it, else preserve the old state.

Parameters
nerrname of the error with 'LUMIERA_ERROR_' prefix (example: LUMIERA_ERROR_NO_MEMORY)
extraa string (possibly a constructed tmpbuf) which adds some more context to the error, can be a temporary
Returns
old state, that is NULL for success, when the state was cleared and a pointer to a pending error when the error state was already set

Definition at line 105 of file error-state.c.

Referenced by ExceptionError_test::checkErrorFlagPropagation(), and lumiera_lockerror_set().

+ Here is the caller graph for this function:

◆ lumiera_error()

lumiera_err lumiera_error ( void  )

Get and clear current error state.

This function clears the error state, if it needs to be reused, one has to store it in a temporary variable.

Returns
pointer to any pending error of this thread, NULL if no error is pending

Definition at line 124 of file error-state.c.

Referenced by OutputDirector::bringDown(), AllocatorHandle< TY >::Allocation::discard(), AdviceSystem::discardEntry(), ExecResult::ExecResult(), stage::ctrl::anonymous_namespace{ui-dispatcher.hpp}::generateErrorResponse(), HandlingPattern::invoke(), lumiera_plugin_init(), lumiera::maybeThrow(), DispatcherLoop::runSessionThread(), Provision< PStyleContext >::storeCopy(), lumiera::throwOnError(), AllocationCluster::~AllocationCluster(), and MockElm::~MockElm().

+ Here is the caller graph for this function: