Ticket #5893 (closed bug: invalid)

Opened 15 months ago

Last modified 15 months ago

Insane memory usage in vector

Reported by: bgamari Owned by:
Priority: normal Milestone:
Component: libraries (other) Version: 7.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This test case can easily grow the heap to fill my entire 8GB physical addressing space with both ghc 7.0.3 and ghc 7.4.1. This despite the fact that the original vectors themselves are only 8MB in size and only supposedly non-copying calls are being made. Commenting out either of the prints at the end returns things to sanity. I'm unsure of whether this should be

Presumably the case could be simplified a bit, but this was my first cut at paring it down.

Attachments

Test.hs Download (0.7 KB) - added by bgamari 15 months ago.
Reduced test case
Test-reduced.hs Download (421 bytes) - added by bgamari 15 months ago.
Even smaller test case

Change History

Changed 15 months ago by bgamari

Reduced test case

Changed 15 months ago by bgamari

Even smaller test case

Changed 15 months ago by bgamari

  • component changed from Compiler to libraries (other)

Changed 15 months ago by rl

  • status changed from new to closed
  • resolution set to invalid

This is a bug in vector, takeWhile and dropWhile both copy despite what the docs say. I created a  ticket. Thanks for spotting this.

Note: See TracTickets for help on using tickets.