[Tarantool-patches] [PATCH] decimal: fix build with GCC 10

Alexander Turenko alexander.turenko at tarantool.org
Mon Jun 8 14:22:13 MSK 2020


The patch itself is okay.

On Fri, Jun 05, 2020 at 05:01:25PM +0300, Serge Petrenko wrote:
> GCC 10 produces the following error:
> cc1: warning: function may return address of local variable [-Wreturn-local-addr]
> 
> Fix it.

It would be good to mention whether it is a real problem or
false-positive. (The patch is already pushed, so this comment is just
for information.)

As I see, we actually return a data on the stack before the patch, so it
worth to mention the bugfix in the release notes. Kirill, can you add
this?

@ChangeLog

- Fix use-after-scope when converting a decimal number to int64_t or
  uint64_t that may lead to undefined behaviour in tuple comparators and
  so in behaviour of space indices (part of gh-4966).

(Serge, correct me if I'm wrong here.)

BTW, are those hints pesisted for vinyl? Can we get wrong results even
after upgrade?

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list