Modify

Ticket #7484 (closed Bugs: fixed)

Opened 19 months ago

Last modified 16 months ago

shared_memory_object does not initialise m_mode in default ctor

Reported by: Graham Hudspith <graham.hudspith@…> Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

The default ctor for shared_memory_object does not initialise the m_mode member.

I can't find an enum/#define for the "zero" value of mode_t, so I guess a simple:

inline shared_memory_object::shared_memory_object()
   :  m_handle(file_handle_t(ipcdetail::invalid_file())),
      m_mode(0) // <--- this is the new line
{}

would do the job.

Reported to us when we run a static analysis program on our code which uses the boost interprocess library.

This is against the 1.51.0 release of boost, but I've checked your svn trunk and it is still there.

Attachments

Change History

comment:1 Changed 19 months ago by graham.hudspith@…

  • Summary changed from shared_memory_object does initialise m_mode in default ctor to shared_memory_object does not initialise m_mode in default ctor

comment:2 Changed 16 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

(In [82434]) Fixes #7484

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.