Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0b1ca4a

Browse filesBrowse files
evanlucasFishrock123
authored andcommitted
src: Add ABORT macro
Windows 8+ compiled in Release mode exits with code 0xC0000409 when abort() is called. This prevents us from being able to reliably verify an abort exit code (3) on windows. PR-URL: #2776 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-by: Trevor Norris <trev.norris@gmail.com>
1 parent 5905b14 commit 0b1ca4a
Copy full SHA for 0b1ca4a

File tree

Expand file treeCollapse file tree

11 files changed

+28
-21
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

11 files changed

+28
-21
lines changed
Open diff view settings
Collapse file

‎src/cares_wrap.cc‎

Copy file name to clipboardExpand all lines: src/cares_wrap.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ static void GetAddrInfo(const FunctionCallbackInfo<Value>& args) {
10671067
break;
10681068
default:
10691069
CHECK(0 && "bad address family");
1070-
abort();
1070+
ABORT();
10711071
}
10721072

10731073
GetAddrInfoReqWrap* req_wrap = new GetAddrInfoReqWrap(env, req_wrap_obj);
@@ -1193,7 +1193,7 @@ static void SetServers(const FunctionCallbackInfo<Value>& args) {
11931193
break;
11941194
default:
11951195
CHECK(0 && "Bad address family.");
1196-
abort();
1196+
ABORT();
11971197
}
11981198

11991199
if (err)
Collapse file

‎src/fs_event_wrap.cc‎

Copy file name to clipboardExpand all lines: src/fs_event_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
146146
event_string = env->change_string();
147147
} else {
148148
CHECK(0 && "bad fs events flag");
149-
abort();
149+
ABORT();
150150
}
151151

152152
Local<Value> argv[] = {
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ void SetupDomainUse(const FunctionCallbackInfo<Value>& args) {
918918

919919
if (!tick_callback_function->IsFunction()) {
920920
fprintf(stderr, "process._tickDomainCallback assigned to non-function\n");
921-
abort();
921+
ABORT();
922922
}
923923

924924
process_object->Set(env->tick_callback_string(), tick_callback_function);
@@ -1526,7 +1526,7 @@ void GetActiveHandles(const FunctionCallbackInfo<Value>& args) {
15261526

15271527

15281528
static void Abort(const FunctionCallbackInfo<Value>& args) {
1529-
abort();
1529+
ABORT();
15301530
}
15311531

15321532

@@ -2146,14 +2146,14 @@ static void OnFatalError(const char* location, const char* message) {
21462146
fprintf(stderr, "FATAL ERROR: %s\n", message);
21472147
}
21482148
fflush(stderr);
2149-
abort();
2149+
ABORT();
21502150
}
21512151

21522152

21532153
NO_RETURN void FatalError(const char* location, const char* message) {
21542154
OnFatalError(location, message);
21552155
// to suppress compiler warning
2156-
abort();
2156+
ABORT();
21572157
}
21582158

21592159

@@ -3555,9 +3555,9 @@ inline void PlatformInit() {
35553555
// Anything but EBADF means something is seriously wrong. We don't
35563556
// have to special-case EINTR, fstat() is not interruptible.
35573557
if (errno != EBADF)
3558-
abort();
3558+
ABORT();
35593559
if (fd != open("/dev/null", O_RDWR))
3560-
abort();
3560+
ABORT();
35613561
}
35623562

35633563
CHECK_EQ(err, 0);
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static void crypto_lock_init(void) {
182182

183183
for (i = 0; i < n; i++)
184184
if (uv_mutex_init(locks + i))
185-
abort();
185+
ABORT();
186186
}
187187

188188

@@ -3466,7 +3466,7 @@ void SignBase::CheckThrow(SignBase::Error error) {
34663466
case kSignPublicKey:
34673467
return env()->ThrowError("PEM_read_bio_PUBKEY failed");
34683468
default:
3469-
abort();
3469+
ABORT();
34703470
}
34713471
}
34723472

Collapse file

‎src/node_crypto_bio.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto_bio.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ long NodeBIO::Ctrl(BIO* bio, int cmd, long num, void* ptr) {
172172
break;
173173
case BIO_C_SET_BUF_MEM:
174174
CHECK(0 && "Can't use SET_BUF_MEM_PTR with NodeBIO");
175-
abort();
175+
ABORT();
176176
break;
177177
case BIO_C_GET_BUF_MEM_PTR:
178178
CHECK(0 && "Can't use GET_BUF_MEM_PTR with NodeBIO");
Collapse file

‎src/spawn_sync.cc‎

Copy file name to clipboardExpand all lines: src/spawn_sync.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ void SyncProcessRunner::TryInitializeAndRunLoop(Local<Value> options) {
485485
r = uv_run(uv_loop_, UV_RUN_DEFAULT);
486486
if (r < 0)
487487
// We can't handle uv_run failure.
488-
abort();
488+
ABORT();
489489

490490
// If we get here the process should have exited.
491491
CHECK_GE(exit_status_, 0);
@@ -508,7 +508,7 @@ void SyncProcessRunner::CloseHandlesAndDeleteLoop() {
508508
// callbacks called.
509509
int r = uv_run(uv_loop_, UV_RUN_DEFAULT);
510510
if (r < 0)
511-
abort();
511+
ABORT();
512512

513513
CHECK_EQ(uv_loop_close(uv_loop_), 0);
514514
delete uv_loop_;
Collapse file

‎src/stream_wrap.cc‎

Copy file name to clipboardExpand all lines: src/stream_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static Local<Object> AcceptHandle(Environment* env, StreamWrap* parent) {
179179
handle = wrap->UVHandle();
180180

181181
if (uv_accept(parent->stream(), reinterpret_cast<uv_stream_t*>(handle)))
182-
abort();
182+
ABORT();
183183

184184
return scope.Escape(wrap_obj);
185185
}
Collapse file

‎src/tls_wrap.cc‎

Copy file name to clipboardExpand all lines: src/tls_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void TLSWrap::InitSSL() {
152152
SSL_set_connect_state(ssl_);
153153
} else {
154154
// Unexpected
155-
abort();
155+
ABORT();
156156
}
157157

158158
// Initialize ring for queud clear data
Collapse file

‎src/tty_wrap.cc‎

Copy file name to clipboardExpand all lines: src/tty_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void TTYWrap::GuessHandleType(const FunctionCallbackInfo<Value>& args) {
7272
case UV_NAMED_PIPE: type = "PIPE"; break;
7373
case UV_UNKNOWN_HANDLE: type = "UNKNOWN"; break;
7474
default:
75-
abort();
75+
ABORT();
7676
}
7777

7878
args.GetReturnValue().Set(OneByteString(env->isolate(), type));
Collapse file

‎src/udp_wrap.cc‎

Copy file name to clipboardExpand all lines: src/udp_wrap.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void UDPWrap::DoBind(const FunctionCallbackInfo<Value>& args, int family) {
166166
break;
167167
default:
168168
CHECK(0 && "unexpected address family");
169-
abort();
169+
ABORT();
170170
}
171171

172172
if (err == 0) {
@@ -278,7 +278,7 @@ void UDPWrap::DoSend(const FunctionCallbackInfo<Value>& args, int family) {
278278
break;
279279
default:
280280
CHECK(0 && "unexpected address family");
281-
abort();
281+
ABORT();
282282
}
283283

284284
if (err == 0) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.