Skip to content

util: IOTJS_ASSERT prints stack trace on macOS#415

Merged
yorkie merged 3 commits intomasterfrom
debug
Nov 20, 2018
Merged

util: IOTJS_ASSERT prints stack trace on macOS#415
yorkie merged 3 commits intomasterfrom
debug

Conversation

@legendecas
Copy link
Copy Markdown
Contributor

  • npm test passes
  • tests and/or benchmarks are included

Currently stack trace only prints on linux platform. While macOS actually support backtrace too, this PR enables backtrace on macOS platform.

@legendecas legendecas changed the title iotjs-util: IOTJS_ASSERT prints stack trace on debug builds iotjs-util: IOTJS_ASSERT prints stack trace on macOS Nov 19, 2018
@legendecas legendecas changed the title iotjs-util: IOTJS_ASSERT prints stack trace on macOS util: IOTJS_ASSERT prints stack trace on macOS Nov 19, 2018
Copy link
Copy Markdown
Contributor

@algebrait algebrait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

perror("backtrace_symbols");
exit(EXIT_FAILURE);
#if (defined(__linux__) || defined(__APPLE__))
void* bt[IOTJS_BACKTRACE_LEN];
Copy link
Copy Markdown
Member

@yorkie yorkie Nov 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@legendecas May I ask you to revert the name to buffer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not a buffer. this is a storage of backtrace.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what's the bt for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an abbreviation for backtrace

Copy link
Copy Markdown
Contributor

@qile222 qile222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yorkie yorkie merged commit 11eda50 into master Nov 20, 2018
@yorkie yorkie deleted the debug branch November 20, 2018 14:49
qile222 pushed a commit that referenced this pull request Dec 13, 2018
* master: (35 commits)
  https: client request doesn’t define default encoding (#440)
  n-api: data pointer was NULL on getting typed array info (#441)
  os: build bcast address interface. (#439)
  assert: better deepStrictEqual assertion (#435)
  working on v0.11.x (#434)
  process: memory leaks on recursive ticking (#433)
  uv, os: implement os.{get,set}Priority functions (#409)
  jerry: implement ES2015 class feature (part II.) (#428)
  test: fix wrong travis diff target introduced by #425 (#429)
  jerry: pass and enable jerry-test-suite (#425)
  n-api: ArrayBuffer/TypedArray support (#419)
  deps: upgrade the mbedtls to 2.13.0-apache (#384)
  jerry: rework jerry_parse function (#422)
  jerry: finalize hint of array buffers (#421)
  jerry: reduce the argument count of ecma_op_object_get_property_names (#424)
  n-api: update headers/test suites to LTS(10.13.0) (#416)
  jerry: Date.now shall return an integer (#418)
  n-api: thread safe functions (#411)
  util: IOTJS_ASSERT prints stack trace on macOS (#415)
  process: set immediate shall start an idle handle to activate uv_loop (#417)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants