Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
19f30f79
Commit
19f30f79
authored
Mar 27, 2017
by
Thomas Braun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: throwing version of new called
Solution: Pass (std::nothrow) as done in all other places.
parent
634c69ab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
norm_engine.cpp
src/norm_engine.cpp
+2
-1
socket_base.cpp
src/socket_base.cpp
+4
-3
zmq.cpp
src/zmq.cpp
+1
-1
zmq_utils.cpp
src/zmq_utils.cpp
+3
-2
No files found.
src/norm_engine.cpp
View file @
19f30f79
...
...
@@ -415,7 +415,8 @@ void zmq::norm_engine_t::recv_data(NormObjectHandle object)
if
(
NULL
==
rxState
)
{
// This is a new stream, so create rxState with zmq decoder, etc
rxState
=
new
NormRxStreamState
(
object
,
options
.
maxmsgsize
);
rxState
=
new
(
std
::
nothrow
)
NormRxStreamState
(
object
,
options
.
maxmsgsize
);
if
(
!
rxState
->
Init
())
{
errno_assert
(
false
);
...
...
src/socket_base.cpp
View file @
19f30f79
...
...
@@ -204,9 +204,10 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_, bool
options
.
linger
=
parent_
->
get
(
ZMQ_BLOCKY
)
?
-
1
:
0
;
if
(
thread_safe
)
mailbox
=
new
mailbox_safe_t
(
&
sync
);
mailbox
=
new
(
std
::
nothrow
)
mailbox_safe_t
(
&
sync
);
else
{
mailbox_t
*
m
=
new
mailbox_t
();
mailbox_t
*
m
=
new
(
std
::
nothrow
)
mailbox_t
();
if
(
m
->
get_fd
()
!=
retired_fd
)
mailbox
=
m
;
else
{
...
...
@@ -1298,7 +1299,7 @@ void zmq::socket_base_t::start_reaping (poller_t *poller_)
else
{
scoped_optional_lock_t
sync_lock
(
thread_safe
?
&
sync
:
NULL
);
reaper_signaler
=
new
signaler_t
();
reaper_signaler
=
new
(
std
::
nothrow
)
signaler_t
();
// Add signaler to the safe mailbox
fd
=
reaper_signaler
->
get_fd
();
...
...
src/zmq.cpp
View file @
19f30f79
...
...
@@ -757,7 +757,7 @@ inline int zmq_poller_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
// implement zmq_poll on top of zmq_poller
int
rc
;
zmq_poller_event_t
*
events
;
events
=
new
zmq_poller_event_t
[
nitems_
];
events
=
new
(
std
::
nothrow
)
zmq_poller_event_t
[
nitems_
];
alloc_assert
(
events
);
void
*
poller
=
zmq_poller_new
();
alloc_assert
(
poller
);
...
...
src/zmq_utils.cpp
View file @
19f30f79
...
...
@@ -36,6 +36,7 @@
#include "atomic_counter.hpp"
#include "atomic_ptr.hpp"
#include <assert.h>
#include <new>
#include <stdint.h>
#if !defined ZMQ_HAVE_WINDOWS
...
...
@@ -75,7 +76,7 @@ unsigned long zmq_stopwatch_stop (void *watch_)
void
*
zmq_threadstart
(
zmq_thread_fn
*
func
,
void
*
arg
)
{
zmq
::
thread_t
*
thread
=
new
zmq
::
thread_t
;
zmq
::
thread_t
*
thread
=
new
(
std
::
nothrow
)
zmq
::
thread_t
;
thread
->
start
(
func
,
arg
);
return
thread
;
}
...
...
@@ -265,7 +266,7 @@ int zmq_curve_public (char *z85_public_key, const char *z85_secret_key)
void
*
zmq_atomic_counter_new
(
void
)
{
zmq
::
atomic_counter_t
*
counter
=
new
zmq
::
atomic_counter_t
;
zmq
::
atomic_counter_t
*
counter
=
new
(
std
::
nothrow
)
zmq
::
atomic_counter_t
;
alloc_assert
(
counter
);
return
counter
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment