[Boost-bugs] [Boost C++ Libraries] #8912: libs/regex/src/fileiter.cpp: Spurious failure check

Subject: [Boost-bugs] [Boost C++ Libraries] #8912: libs/regex/src/fileiter.cpp: Spurious failure check
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-25 03:49:31


#8912: libs/regex/src/fileiter.cpp: Spurious failure check
-------------------------------------------------+-------------------------
 Reporter: Jeffrey Walton <noloader@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: regex windows open |
  CreateFileMapping |
-------------------------------------------------+-------------------------
 Line 106:

 hmap = CreateFileMapping(hfile, 0, PAGE_READONLY, 0, 0, 0);
 if((hmap == INVALID_HANDLE_VALUE) || (hmap == NULL))
 {
   CloseHandle(hfile);
   hmap = 0;
   hfile = 0;
   std::runtime_error err("Unable to create file mapping.");
   boost::re_detail::raise_runtime_error(err);
 }

 According to MSDN (http://msdn.microsoft.com/en-
 us/library/windows/desktop/aa366537%28v=vs.85%29.aspx), CreateFileMapping
 returns NULL on failure, and not INVALID_HANDLE_VALUE.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8912>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC