You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2019/03/31 18:42:55 UTC

[kudu-CR] tablet server authorization-test: fix SIGSEGV with static linkage

Hello Andrew Wong,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/12899

to review the following change.


Change subject: tablet_server_authorization-test: fix SIGSEGV with static linkage
......................................................................

tablet_server_authorization-test: fix SIGSEGV with static linkage

There was a global Random instance that called LOG() when initialized.
That's a no-no as LOG() will crash if it is called before glog is
initialized. Sadly it wasn't caught by precommit as we force RELEASE builds
(which are normally statically linked) to use dynamic linkage.

Anyway, the fix is simple: make the Random instance a member of the test
fixture, and convert a few utility methods into fixture methods. The
'mutable' keyword is syntactic sugar that lets those methods remain 'const'.

Change-Id: I91d4988356a5bbd5e6b33ee08b7d49553be45227
---
M src/kudu/tserver/tablet_server_authorization-test.cc
1 file changed, 58 insertions(+), 51 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/99/12899/1
-- 
To view, visit http://gerrit.cloudera.org:8080/12899
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d4988356a5bbd5e6b33ee08b7d49553be45227
Gerrit-Change-Number: 12899
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>

[kudu-CR] tablet server authorization-test: fix SIGSEGV with static linkage

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12899 )

Change subject: tablet_server_authorization-test: fix SIGSEGV with static linkage
......................................................................

tablet_server_authorization-test: fix SIGSEGV with static linkage

There was a global Random instance that called LOG() when initialized.
That's a no-no as LOG() will crash if it is called before glog is
initialized. Sadly it wasn't caught by precommit as we force RELEASE builds
(which are normally statically linked) to use dynamic linkage.

Anyway, the fix is simple: make the Random instance a member of the test
fixture, and convert a few utility methods into fixture methods. The
'mutable' keyword is syntactic sugar that lets those methods remain 'const'.

Change-Id: I91d4988356a5bbd5e6b33ee08b7d49553be45227
Reviewed-on: http://gerrit.cloudera.org:8080/12899
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/tserver/tablet_server_authorization-test.cc
1 file changed, 58 insertions(+), 51 deletions(-)

Approvals:
  Andrew Wong: Looks good to me, approved
  Kudu Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/12899
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I91d4988356a5bbd5e6b33ee08b7d49553be45227
Gerrit-Change-Number: 12899
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] tablet server authorization-test: fix SIGSEGV with static linkage

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/12899 )

Change subject: tablet_server_authorization-test: fix SIGSEGV with static linkage
......................................................................


Patch Set 1: Code-Review+2

Thanks for the patch!


-- 
To view, visit http://gerrit.cloudera.org:8080/12899
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I91d4988356a5bbd5e6b33ee08b7d49553be45227
Gerrit-Change-Number: 12899
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sun, 31 Mar 2019 18:47:42 +0000
Gerrit-HasComments: No