Opened 12 years ago

Closed 12 years ago

#5246 closed Bugs (fixed)

mmap_file_iterator Fails to Initialize Correctly

Reported by: Rob Stewart <robert.stewart@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

The Spirit.Classic mmap_file_iterator, which is still recommended with Spirit.Qi v2, fails to properly initialize m_curChar. The default ctor ignores it and the string ctor only initializes it if the mapping succeeds. This is a problem because the equality operator compares m_curChar. Thus, two default constructed instances may fail to compare equal as may a default constructed instance and one that fails to map an empty file (or any instance that fails to map a file).

Change History (1)

comment:1 by Hartmut Kaiser, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in rev [69476]

Note: See TracTickets for help on using tickets.