Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rlib
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
rlib
Commits
69f44ebd
There was an error fetching the commit references. Please try again later.
Commit
69f44ebd
authored
4 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
649bd95f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
impl/traceable_list.hpp
+2
-2
2 additions, 2 deletions
impl/traceable_list.hpp
sys/sio.hpp
+2
-2
2 additions, 2 deletions
sys/sio.hpp
with
4 additions
and
4 deletions
impl/traceable_list.hpp
+
2
−
2
View file @
69f44ebd
...
...
@@ -19,7 +19,7 @@ namespace rlib {
node
*
prev
;
node
*
next
;
extra_info_t
extra_info
;
// bool flag. specially designed for object_pool.
uint32_t
magic
=
0x199
80427
;
uint32_t
magic
=
0x199
90823
;
template
<
typename
...
TConstructArgs
>
node
(
node
*
prev
,
node
*
next
,
const
extra_info_t
&
extra_info
,
TConstructArgs
...
args
)
:
data
(
std
::
forward
<
TConstructArgs
>
(
args
)
...),
prev
(
prev
),
next
(
next
),
extra_info
(
extra_info
)
...
...
@@ -36,7 +36,7 @@ namespace rlib {
explicit
iterator
(
node
*
ptr
)
:
ptr
(
ptr
)
{}
explicit
iterator
(
T
*
data_pointer
)
:
ptr
(
reinterpret_cast
<
node
*>
(
data_pointer
))
{
if
(
ptr
->
magic
!=
0x199
80427
)
if
(
ptr
->
magic
!=
0x199
90823
)
throw
std
::
invalid_argument
(
"magic_num verification failed. invalid data_pointer passed or ruined memory?"
);
}
...
...
This diff is collapsed.
Click to expand it.
sys/sio.hpp
+
2
−
2
View file @
69f44ebd
...
...
@@ -631,7 +631,7 @@ namespace rlib {
private
:
#pragma pack(push, 1)
struct
packed_msg_head
{
uint32_t
magic
=
0x199
80427
;
uint32_t
magic
=
0x199
90823
;
uint64_t
len
;
};
#pragma pack(pop)
...
...
@@ -640,7 +640,7 @@ namespace rlib {
static
std
::
string
recv_msg
(
sockfd_t
fd
)
{
packed_msg_head
head
;
recvn_ex
(
fd
,
&
head
,
sizeof
(
head
),
MSG_NOSIGNAL
);
if
(
head
.
magic
!=
0x199
80427
)
if
(
head
.
magic
!=
0x199
90823
)
throw
std
::
runtime_error
(
"Invalid magic received."
);
if
(
head
.
len
>
1024ull
*
1024
*
1024
*
2
)
throw
std
::
runtime_error
(
"Message len is greater than 2GiB. Refuse to alloc space."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment