The report was originally filed at LaunchPad by sbester:
Stack trace on maria/5.3 version-info
Also reproducible on maria/5.5
The original test case is attached to the LP bug. Please use it if the shortened one below doesn't work for you on whatever reason. Please also note that the original description suggests to run the test with valgrind.
Shorter test case:
Minimal optimizer_switch: outer_join_with_cache=on,join_cache_incremental=on