code: do not store messages on stack

This is to prevent stack overflows if messages are big.
Partial revert of 0c6d1256
2 jobs for master in 1 minute and 11 seconds (queued for 1 second)
Status Name Job ID Coverage
failed build_test_nix #1415306


skipped sonar_static_analysis #1415307
Name Stage Failure
build_test_nix Build
(use '--show-trace' to show detailed location information)

NoInput "You need to specify store paths either as stdin or as a cli argument"
Uploading artifacts for failed job
Uploading artifacts...
WARNING: /builds/simgrid/remote-simgrid/gcov-txt: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1