I have just upgraded my Mac to Lion and code that worked fine under snow leopard is giving me a run-time exception when constructing a directory_iterator. The error I am getting is "malloc: pointer being freed was not allocated" The line in question that raises this error is: for ( directory_iterator itr( my_path ); itr != end_itr; ++itr ) taken directly from the example and working fine under windows. This is version 1.49 installed with MacPorts. Is this a known problem? I found some vague references to a similar problem in an earlier version of boost but no solution. I have confirmed that I only have 1 copy of the headers and libs on the system and in the correct path. The date stamp on the files matches the last time I did a macports update so this should be the matching library for the header. Please note that I am a real novice to Mac development and have only just started porting code from windows for less than a month. Thanks in advance, Martin