Skip to content

common: stack overflow in JSONFormatter::print_quoted_string#19771

Closed
fangyuxiangGL wants to merge 1 commit intoceph:masterfrom
fangyuxiangGL:segment-core
Closed

common: stack overflow in JSONFormatter::print_quoted_string#19771
fangyuxiangGL wants to merge 1 commit intoceph:masterfrom
fangyuxiangGL:segment-core

Conversation

@fangyuxiangGL
Copy link
Copy Markdown
Contributor

one can reproduce by steps:

  1. configure compression for rgw
  2. upload a big zero bytes object(>= 1G)
  3. use radosgw-admin object stat to dump its info

then radosgw-admin will coredump

Signed-off-by: fang yuxiang fang.yuxiang@eisoo.com

@fangyuxiangGL
Copy link
Copy Markdown
Contributor Author

@cbodley

could u have a look? thanks.

@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented Jan 4, 2018

@fangyuxiangGL this sounds like a fix we'll want to backport - could you please create a tracker issue?

@fangyuxiangGL
Copy link
Copy Markdown
Contributor Author

@cbodley done.

@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented Jan 5, 2018

@fangyuxiangGL i hadn't realized how bad these json/xml escape interfaces were. i opened a separate pr at #19806 that adds streaming interfaces that don't require this allocation. would you be willing to rework the Formatters to use those instead?

@fangyuxiangGL
Copy link
Copy Markdown
Contributor Author

@cbodley

ok, will do it!

@fangyuxiangGL
Copy link
Copy Markdown
Contributor Author

issue doesn't exist after #15599

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.

2 participants