openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

Scary compile errors/warnings on alpine linux

Open AlexanderSchuetz97 opened this issue 1 year ago • 2 comments

This is the error:

[185/190] Linking target codec/console/dec/h264dec
In file included from ../subprojects/googletest-release-1.8.0/googletest/include/gtest/internal/gtest-port.h:263,
                 from ../subprojects/googletest-release-1.8.0/googletest/include/gtest/internal/gtest-internal.h:40,
                 from ../subprojects/googletest-release-1.8.0/googletest/include/gtest/gtest.h:58,
                 from ../test/api/encode_decode_api_test.cpp:1:
In function 'void* memset(void*, int, size_t)',
    inlined from 'int SimulateNALLoss(const unsigned char*, int&, std::vector<SLost_Sim>*, const char*, bool, int&, bool&)' at ../test/api/encode_decode_api_test.cpp:387:10:
/usr/include/fortify/string.h:75:32: warning: 'void* __builtin_memset(void*, int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   75 |         return __builtin_memset(__d, __c, __n);
      |                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
[186/190] Linking target test/encoder/test_encoder

This is some buffer overflow error?

The error is present in the current "head/master" of the git repo and the last release tarball and can be reproduced with an alpine linux docker container. This is the Dockerfile I am using for the container that gets this error:

FROM alpine:latest
RUN apk add nasm git alpine-sdk bash cmake ninja meson perl autoconf automake libtool gperf xz libogg yasm diffutils gawk linux-headers asciidoc doxygen xmlto

To compile I run:

mkdir -p openh264/build
cd openh264/build
meson setup --default-library=static .. --prefix "/project/target" --libdir="/project/target/lib"
ninja

Using the git repositorys head, the ninja build fails because the warning is treated as error. Using the last source tarball I get a warning with the same content but the build continues.

AlexanderSchuetz97 avatar Jul 22 '24 08:07 AlexanderSchuetz97

هذا هو الخطأ:

[185/190] Linking target codec/console/dec/h264dec In file include…

aljam3h avatar Sep 16 '24 03:09 aljam3h

?

AlexanderSchuetz97 avatar Sep 16 '24 07:09 AlexanderSchuetz97