Skip to content

coverage-es-ALL-testrunner SegFault with Ubuntu 24.04 (Noble) and gcc 3.13.0 #2659

@jtovias

Description

@jtovias

Running with Ubuntu 24.04 (noble) and and gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0.

Using cFS-equuleus-rc1-correction

Followed README.sh

make SIMULATION=native ENABLE_UNIT_TESTS=true prep
make
make install
make test

80/95 Test #80: coverage-es-ALL ....................***Exception: SegFault 0.06 sec

cd build/exe/cpu1
./coverage-es-ALL-testrunner

[ PASS] 09.101 es_UT.c:4494 - ES_UT_SysLog_snprintf(SysLogBuf, sizeof(SysLogBuf), "b")
Segmentation fault

The seg fault occurs with vspnprintf having SpecStringPtr = NULL

es_UT.c:
UtAssert_VOIDCALL(ES_UT_SysLog_snprintf(SysLogBuf, sizeof(SysLogBuf), NULL));

void ES_UT_SysLog_snprintf(char *Buffer, size_t BufferSize, const char *SpecStringPtr, ...)
{
CFE_ES_SysLog_vsnprintf(Buffer, BufferSize, SpecStringPtr, ap);
}

cfe_es_syslog.c
CFE_ES_SysLog_vsnprintf(char *Buffer, size_t BufferSize, const char *SpecStringPtr, va_list ArgPtr) {
PrintLen = vsnprintf(&Buffer[StringLen], BufferSize - StringLen, SpecStringPtr, ArgPtr);
}

Seems the vsnprintf doesn't like the format ptr set to NULL.
I changed it to empty "" and it PASS. PrintLen is set 0.

The same coverage-es-ALL-testrunner PASS with Ubuntu 20.04 (Focal) and gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    CCB:IgnorePull Request can be ignored. Will be re-examined at by next CCB.CCB:Tracked-Internally

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions