-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix[BMQ,MQB]: ensure Solaris build #561
Conversation
Signed-off-by: Evgeny Malygin <[email protected]>
2b8c80a
to
efbd130
Compare
|
These failures are also present in the build from the latest main: https://github.com/bloomberg/blazingmq/actions/runs/12712681267/job/35439252483 |
return bsl::shared_ptr<BlobSpPool>( | ||
new (*alloc) BlobSpPool( | ||
bdlf::BindUtil::bind(&createBlob, | ||
blobBufferFactory_p, | ||
bdlf::PlaceHolders::_1, // arena | ||
bdlf::PlaceHolders::_2), // allocator | ||
k_BLOB_POOL_GROWTH_STRATEGY, | ||
alloc), | ||
alloc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return bsl::shared_ptr<BlobSpPool>( | |
new (*alloc) BlobSpPool( | |
bdlf::BindUtil::bind(&createBlob, | |
blobBufferFactory_p, | |
bdlf::PlaceHolders::_1, // arena | |
bdlf::PlaceHolders::_2), // allocator | |
k_BLOB_POOL_GROWTH_STRATEGY, | |
alloc), | |
alloc); | |
return bsl::allocate_shared<BlobSpPool>( | |
alloc, | |
bdlf::BindUtil::bind(&createBlob, | |
blobBufferFactory_p, | |
bdlf::PlaceHolders::_1, // arena | |
bdlf::PlaceHolders::_2), // allocator | |
k_BLOB_POOL_GROWTH_STRATEGY)); |
Slightly reduces the number of allocator shenanigans. allocate_shared
should forward the allocator to the right BlobSpPool
constructor and provide it to the resulting shared_ptr
.
@@ -925,7 +925,7 @@ void Domain::removeDomainReset() | |||
bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex); // LOCK | |||
|
|||
d_state = e_PREREMOVE; | |||
d_teardownRemoveCb = nullptr; | |||
d_teardownRemoveCb = bsl::nullptr_t(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the use of nullptr_t
's constructor a little controversial, I feel as if we should really only be using preexisting representations of a nullptr (e.g. NULL, nullptr) but I suppose this works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the use of
nullptr_t
's constructor a little controversial, I feel as if we should really only be using preexisting representations of a nullptr (e.g. NULL, nullptr) but I suppose this works?
Pure nullptr
doesn't work on Solaris, NULL
or bsl::nullptr_t()
work, but bsl::nullptr_t()
is more restrictive. We typically used bsl::nullptr_t()
to reset callbacks (bsl::function
)
Signed-off-by: Evgeny Malygin <[email protected]>
efbd130
to
1b765f7
Compare
bmqp::BlobPoolUtil::createBlobPool
, by returning a shared pointer to the blob pool. The choice of shared pointer type is made to do it compatible with resource manager PR: Perf[BMQ,MQB]: resource manager for per-thread resources #499bmqstoragetool
: remove incompatible initializer list usage.bmqio_ntcchannel.t
: disambiguate argument forntcf::System::createInterface
call.publish
override to get rid of a warning.bmqu::BlobIterator
remove unusedconst char* operator->() const;
that produces a compilation warningWarning: Questionable (non-class) return type for BloombergLP::bmqu::BlobIterator::operator->() const.
nullptr
usage byNULL
orbsl::nullptr_t()
where applicable.mqbstat
: pass enum template arguments in a way acceptable by Solaris compiler (BrokerStats::EventType::Enum::e_CLIENT_DESTROYED
->BrokerStats::EventType::e_CLIENT_DESTROYED
).bmqtst::TestHelperUtil::ignoreCheckDefAlloc()