mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-37052 JSON_SCHEMA_VALID stack overflow handling errors
Since MDEV-33209 (09ea2dc788
)
the the stack overflow errors are just injected instead of
frailer mechanisms to consume stack. These mechanims where
not carried forward to the JSON_TABLE or JSON_SCHEMA_VALID where
the pattern was the same.
add_extra_deps also no-longer recursively iterates in
out of stack conditions.
Tests performed in json_debug_nonembedded(_noasan).
This commit is contained in:
@@ -189,20 +189,4 @@ check_table_access(THD *thd, privilege_t requirements,TABLE_LIST *tables,
|
||||
{ return false; }
|
||||
#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
|
||||
|
||||
|
||||
/*
|
||||
Allocating memory and *also* using it (reading and
|
||||
writing from it) because some build instructions cause
|
||||
compiler to optimize out stack_used_up. Since alloca()
|
||||
here depends on stack_used_up, it doesnt get executed
|
||||
correctly and causes json_debug_nonembedded to fail
|
||||
( --error ER_STACK_OVERRUN_NEED_MORE does not occur).
|
||||
*/
|
||||
#define ALLOCATE_MEM_ON_STACK(A) do \
|
||||
{ \
|
||||
uchar *array= (uchar*)alloca(A); \
|
||||
bzero(array, A); \
|
||||
my_checksum(0, array, A); \
|
||||
} while(0)
|
||||
|
||||
#endif /* SQL_PARSE_INCLUDED */
|
||||
|
Reference in New Issue
Block a user