Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
vgsuppression.c File Reference

dummy executable to generate valgrind suppressions. More...

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

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

Typedef Documentation

◆ lumiera_err

typedef const char* lumiera_err

Definition at line 29 of file vgsuppression.c.

Function Documentation

◆ lumiera_error_get()

struct lumiera_errorcontext_struct * lumiera_error_get ( void  )

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

References LUMIERA_DIE, lumiera_error_initialized, lumiera_error_tls, lumiera_error_tls_init(), and NULL.

Referenced by lumiera_error(), lumiera_error_expect(), lumiera_error_extra(), lumiera_error_peek(), lumiera_error_set(), and main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lumiera_error_set()

lumiera_err lumiera_error_set ( lumiera_err  nerr,
const char *  extra 
)

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 96 of file error-state.c.

References extra, lumiera_error_get(), and NULL.

Referenced by ExceptionError_test::checkErrorFlagPropagation(), stage::anonymous_namespace{notification-service.cpp}::LUMIERA_INTERFACE_INSTANCE(), steam::control::anonymous_namespace{session-command-service.cpp}::LUMIERA_INTERFACE_INSTANCE(), lumiera_lockerror_set(), main(), and main().

+ Here is the call graph for this function:
+ 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 115 of file error-state.c.

References lumiera_errorcontext::err, lumiera_error_get(), and NULL.

Referenced by ExecResult::ExecResult(), GuiRunner::GuiRunner(), MockElm::~MockElm(), util::anonymous_namespace{format-string.hpp}::_clear_errorflag(), util::anonymous_namespace{format-string.hpp}::_log_unknown_exception(), OutputDirector::bringDown(), AdviceSystem::deregisterRequest(), Suite::describe(), TypedAllocationManager::destroyElement(), stage::ctrl::anonymous_namespace{ui-dispatcher.hpp}::generateErrorResponse(), HandlingPattern::invoke(), test::anonymous_namespace{suite.cpp}::invokeTestCase(), Index< POA >::isValid(), PlacementIndex::isValid(), stage::launchUI(), lumiera::anonymous_namespace{appstate.cpp}::log_and_clear_unexpected_errorstate(), lumiera_plugin_init(), lumiera::error::lumiera_unexpectedException(), main(), main(), lumiera::maybeThrow(), AllocatorHandle< TY >::operator()(), GtkLumiera::run(), MockSys::run(), DispatcherLoop::runSessionThread(), Provision< AD >::storeCopy(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), lumiera::anonymous_namespace{instancehandle.hpp}::throwIfError(), and lumiera::throwOnError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 43 of file vgsuppression.c.

References lumiera_error(), lumiera_error_get(), lumiera_error_set(), lumiera_tmpbuf_freeall(), lumiera_tmpbuf_provide(), and lumiera_tmpbuf_snprintf().

+ Here is the call graph for this function: