COVESA/dlt-daemon

*** stack smashing detected ***: - terminated Abort (core dumped) QNX

Closed this issue · 3 comments

Hi I am running CPP artifact build on QNX platform . I get the DLT logs in dlt-viewer from main function but when it goes inside the function called form main it prints the logs and the whole app gets crashes after when it comes out of the function call and gives *** stack smashing detected ***: - terminated Abort (core dumped) . Things work perfectly fine when I don't call DLT logs inside the function .No crash happens with main function logs but when I do a function call with DLT logs inside the function it smashes after printing logs of that function

Please help . Things go right on linux platform but when compilation is done on QNX same code when comes out of function/method call gives stack smashing error after printing logs DLT Logs from the function .There are no missing libraries as the code got built and running .The problem is with DLT .

#include <iostream>

using namespace std;


#include <stdio.h>

#include <dlt/dlt.h>

// Define a DLT context

DLT_DECLARE_CONTEXT(ctx);


// Function that logs a message using the provided DLT context

void logMessageWithDLT() 
{

    // Log a message using the provided DLT context
    DLT_LOG(ctx, DLT_LOG_ERROR, DLT_CSTRING("Inside logMessageWithDLT: Logging a message "))

}

int main()

{

  std::cout <<"THOR LOVE AND THUNDER ";

  DLT_REGISTER_APP("MOCK", "Test Application for Logging");

  DLT_REGISTER_CONTEXT(ctx,"MC1","My hello Context 1");

 
 // Register the context


    DLT_LOG(ctx, DLT_LOG_INFO, DLT_CSTRING("HELLO WORLD "));


    // Call the function

    logMessageWithDLT();

**// APP crashes here** 


        DLT_UNREGISTER_CONTEXT(ctx);
        DLT_UNREGISTER_APP();
 

}

Hello @aazaad29 ,
we did not observe this kind of issue so far. so i am expecting a problem with your setup. Also the issue report is to incomplete to analyze.
Can you please analyze the corefile and provide:
Backtrace,
Register dump
Stack dump

Which version of dlt-daemon are you using? Which compile flags have you activated?

Reporter deleted its account without providing required information -> closing

Close due to ghost account