Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.28
-
None
-
MacOS
Description
Implementations of overloaded standalone functions dbug_print_rec, located in the file storage/innobase/ut/ut0ut.cc, return pointer to a temporary allocated memory. In result attempt to compile server on MacOS fails with error
[ 18%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/ut/ut0ut.cc.o
|
10.3/storage/innobase/ut/ut0ut.cc:635:9: error: returning address
|
of local temporary object [-Werror,-Wreturn-stack-address]
|
return r.str().c_str();
|
^~~~~~~
|
10.3/storage/innobase/ut/ut0ut.cc:641:9: error: returning address
|
of local temporary object [-Werror,-Wreturn-stack-address]
|
return r.str().c_str();
|
^~~~~~~
|
10.3/storage/innobase/ut/ut0ut.cc:647:9: error: returning address
|
of local temporary object [-Werror,-Wreturn-stack-address]
|
return r.str().c_str();
|
^~~~~~~
|
10.3/storage/innobase/ut/ut0ut.cc:653:9: error: returning address
|
of local temporary object [-Werror,-Wreturn-stack-address]
|
return r.str().c_str();
|
^~~~~~~
|
10.3/storage/innobase/ut/ut0ut.cc:665:9: error: returning address
|
of local temporary object [-Werror,-Wreturn-stack-address]
|
return r.str().c_str();
|
^~~~~~~
|
5 errors generated.
|
The overloaded function dbug_print_rec() isn't used anywhere along the source code.
So, it is proposed to remove them at all.
Attachments
Issue Links
- is caused by
-
MDEV-21138 Assertion `col->ord_part' or `f.col->ord_part' failed in row_build_index_entry_low, assertion: buf != field_ref_zero in row_merge_buf_add
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Implementations of overloaded standalone functions dbug_print_rec, located in the file storage/innobase/ut/ut0ut.cc, return pointer to a temporary allocated memory. In result attempt to compile server on MacOS fails with error
[ 18%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/ut/ut0ut.cc.o 10.3/storage/innobase/ut/ut0ut.cc:635:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:641:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:647:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:653:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:665:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 5 errors generated. The overloaded function dbug_print_rec() isn't used anywhere along the source code. So, it is proposed to remove them at all. |
Implementations of overloaded standalone functions dbug_print_rec, located in the file storage/innobase/ut/ut0ut.cc, return pointer to a temporary allocated memory. In result attempt to compile server on MacOS fails with error
{noformat} [ 18%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/ut/ut0ut.cc.o 10.3/storage/innobase/ut/ut0ut.cc:635:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:641:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:647:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:653:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 10.3/storage/innobase/ut/ut0ut.cc:665:9: error: returning address of local temporary object [-Werror,-Wreturn-stack-address] return r.str().c_str(); ^~~~~~~ 5 errors generated. {noformat} The overloaded function dbug_print_rec() isn't used anywhere along the source code. So, it is proposed to remove them at all. |
Fix Version/s | 10.3 [ 22126 ] |
Link |
This issue is caused by |
Component/s | Debug [ 14208 ] | |
Component/s | Storage Engine - InnoDB [ 10129 ] |
Environment | MacOS |
Fix Version/s | 10.3.28 [ 25111 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 117318 ] | MariaDB v4 [ 158727 ] |
no, they are supposed to be used from the gdb prompt, don't remove.
typically other dbug_print* functions use a static buffer. Like
#ifndef DBUG_OFF
{
}