[Starlingx-discuss] openSUSE: sm-db build failure

Qian, Bin Bin.Qian at windriver.com
Thu Sep 26 03:56:51 UTC 2019

Please DO NOT remove the compile flag  -Werror.  In this case it could cause read buffer overflow, as the printf will read 8 bytes from a 4 bytes allocated memory address, which could be significant stability and security issue. We will have to identify and solve the issue of a broken link SmTimerIdT = int64_t = long long int = 8 bytes integer.



From: Arce Moreno, Abraham [abraham.arce.moreno at intel.com]
Sent: Wednesday, September 25, 2019 9:02 AM
To: Qian, Bin; Dominig ar Foll (Intel Open Source); starlingx-discuss at lists.starlingx.io
Subject: RE: [Starlingx-discuss] openSUSE: sm-db build failure

Thanks Bin,

> I am wondering there is something not right in your build environment. The
> SmTimerIdT is defined as:
> typedef int64_t SmTimerIdT;
> in sm_timer.h [1] patch set 1..3, which is part of the sm-common lib.
> There are multiple printf statements in sm-common lib that use the formater
> "%li" such as [2], line 150, 201. I don't expect you see the same errors from
> sm-common build, or otherwise the sm-db won't start building as it needs
> sm-common.

I am using container and virtual machine (vagrant) as development environments
in a Ubuntu workstation.

> Based on the error message in your first email, apparently the SmTimerIdT
> was "int" ('SmTimerIdT {aka int}'). That was the code before my commit
> "Enhance timer system to avoid double deregister".  [1] line 23 on the
> "base".

Let me check again, I have repeated the process to confirm I am really using upstream
code with our openSUSE HA specfiles.

> I would suggest you verify the sm_timer.h to see if it include the changes in
> [1], and possibly clean up your build environment to see if it helps.
> If your sm-common build also encountered the same errors, you may want
> to verify the size of int64_t on your build environment, it is expected to be 8-
> byte integer.

I will... thanks!

More information about the Starlingx-discuss mailing list