[tarantool/tarantool] build: LTO release build fails on uninitialized variables (#4512)

avtikhon notifications at github.com
Thu Sep 19 10:48:28 MSK 2019


Tarantool version:
master

OS version:
Linux

Bug description:
```
LTO build failed because of warnings on the uninitialized
    variables treated as errors:
    
    /mnt/src/box/tuple_update.c: In function ‘do_op_splice’:
    /mnt/src/box/tuple_update.c:764:15: error: ‘str_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
       arg->offset = str_len;
                   ^
    /mnt/src/box/tuple_update.c:755:10: note: ‘str_len’ was declared here
      int32_t str_len;
              ^
    /mnt/src/box/tuple_update.c: In function ‘do_op_bit’:
    /mnt/src/box/tuple_update.c:725:12: error: ‘val’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
       arg->val &= val;
                ^
    /mnt/src/box/tuple_update.c:720:11: note: ‘val’ was declared here
      uint64_t val;
               ^
    /mnt/src/box/tuple_update.c: In function ‘update_read_ops’:
    /mnt/src/box/tuple_update.c:1068:4: error: ‘field_no’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
        diag_set(ClientError, ER_NO_SUCH_FIELD_NO, field_no);
        ^
    /mnt/src/box/tuple_update.c:1057:10: note: ‘field_no’ was declared here
      int32_t field_no;
              ^
    lto1: all warnings being treated as errors
```
Steps to reproduce:
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DENABLE_LTO=ON && make -j

Optional (but very desirable):
* coredump
* backtrace
* netstat



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tarantool/tarantool/issues/4512
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190919/144b0e5b/attachment.html>


More information about the Tarantool-patches mailing list