Blender crashes with std::bad_alloc after rendering a 3000x3000 scene

The scenario:
I’m rendering a single frame scene with resolution at 3000x3000. The rendering itself goes fine, but whenever it stops, be it due to being cancelled or due to being finished, Blender crashes.

The log:
Here’s a log from the console during one such crash:

connect failed: No such file or directory
Read new prefs: /home/?/.config/blender/2.76/config/userpref.blend
found bundled python: /home/?/programs/blender 2.76/blender-2.76b-linux-glibc211-i686/2.76/python
read blend: /home/?/Documents/blenderprojects/nn/nn.blend
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
group 0xac172c48 is unclassified!
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
group 0xa78633c8 is unclassified!
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
write exr tmp file, 3000x3000, /tmp/blender_d0aK0F/nn.blend_Scene_RenderLayer.exr
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
CSG failed, exception non intersecting group is not IN or OUT! (poly_b)
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

Others:
RAM most definitely doesn’t run out at any one point. I’m using 2.76 due to technical requierments limitation. I know sharing the .blend file could help, but unfortunately I have some justified reasons not to. It’s a pretty modest scene with 20k verts/30k tris and some quite basic shaders and modifiers.
From what I can read from the log, there’s probably some issues with the boolean modifiers, but those messages are output upon loading the scene and not during, after or when begining rendering.

Edit:
When rendering at lower resolutions, say 1500x1500, Blender behaves just fine.

What is the reason for the issue? How to fix it?