Skip to content

Commit

Permalink
src,build: adjust suppressions file and ub on src
Browse files Browse the repository at this point in the history
Co-Authored-By: Santiago Gimeno <[email protected]>
  • Loading branch information
RafaelGSS and santigimeno committed Feb 26, 2024
1 parent 4b68e2a commit 1a9d4c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/spawn_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void SyncProcessOutputBuffer::OnRead(const uv_buf_t* buf, size_t nread) {


size_t SyncProcessOutputBuffer::Copy(char* dest) const {
memcpy(dest, data_, used());
if (dest != nullptr)
memcpy(dest, data_, used());
return used();
}

Expand Down
8 changes: 6 additions & 2 deletions suppressions.supp
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
undefined-behavior:deps/icu-small/source/common/uloc_tag.cpp
undefined-behavior:deps/v8/*
vptr:deps/icu-small/source/common/uloc_tag.cpp
vptr:deps/icu-small/source/common/unistr.cpp
shift-base:deps/v8/src/wasm/decoder.h
vptr:deps/icu-small/source/common/sharedobject.cpp
vptr:deps/icu-small/source/i18n/coll.cpp
nonnull-attribute:deps/v8/src/snapshot/snapshot-source-sink.h
6 changes: 5 additions & 1 deletion test/parallel/test-node-output-console.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ describe('console output', { concurrency: true }, () => {
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceStackTrace);
for (const { name, transform, env } of tests) {
it(name, async () => {
await snapshot.spawnAndAssert(fixtures.path(name), transform ?? defaultTransform, { env });
await snapshot.spawnAndAssert(
fixtures.path(name),
transform ?? defaultTransform,
{ env: { ...env, ...process.env } },
);
});
}
});

0 comments on commit 1a9d4c8

Please sign in to comment.