[MXS-427] Logging a large string causes a segmentation fault Created: 2015-10-24  Updated: 2015-10-26  Resolved: 2015-10-26

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.2.1
Fix Version/s: 1.3.0

Type: Bug Priority: Minor
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

When a sufficiently large message is logged MaxScale receives a segmentation fault due to a failure to allocate enough memory on the stack. This only happens with extremely large log messages but for example the readwritesplit and readconnroute modules both log queries to the trace log. If one were to do a large enough bulk insert, MaxScale would crash.

A simple fix to this would be to set an upper limit to the log message length before anything is done. There is a hard limit imposed by the block buffer size of 4k but the allocation of stack memory is done before that.


Generated at Thu Feb 08 03:59:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.