osdc: Update CB_ObjectOperation to use value types for patterns#64956
osdc: Update CB_ObjectOperation to use value types for patterns#64956SrinivasaBharath merged 1 commit intoceph:mainfrom
Conversation
38241e2 to
8a40aaa
Compare
8a40aaa to
0245b29
Compare
|
jenkins retest this please |
src/osdc/Objecter.h
Outdated
| struct CB_ObjectOperation_decodevals { | ||
| uint64_t max_entries; | ||
| Vals* pattrs; | ||
| Vals pattrs; |
There was a problem hiding this comment.
I don't think this works. The pointer is an out parameter.
| if (r >= 0) { | ||
| auto p = bl.cbegin(); | ||
| try { | ||
| if (pattrs) |
There was a problem hiding this comment.
This checks whether the pointer is null and doesn't decode to it if so. You found a bug, but the right fix is to get rid of the uses of &ignore and pass in a null pointer instead.
There was a problem hiding this comment.
To be fair, the compiler found the bug :)
I simplified the use of the temp by keeping it in the object. There's probably a more elegant way to do this but it would involve a much greater change
There was a problem hiding this comment.
The bug is in passing something on the stack to it. We still need to be able to write to an object given its address. The pointer value should be a pointer value, we just shouldn't be giving it an address to something on the stack.
376b231 to
56e7f8f
Compare
ace3fe7 to
67241c3
Compare
67241c3 to
b179c0e
Compare
…odekeys to persist temp val The callback object would create a local variable then save the address of the local variable in the object which will later be referenced. This leads to access stack memory that is no longer in scope, possibly not even in the same thread. Fixes: https://tracker.ceph.com/issues/72403 Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
b179c0e to
f5ea624
Compare
|
Tested from RGW side, and got approval from @ivancich , please find details in bz : https://tracker.ceph.com/issues/73576 |
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. Update Log: https://github.com/ceph/ceph/actions/runs/18838045001 |
The callback object would create a local variable then save the address of the
local variable in the object which will later be referenced. This leads
to access stack memory that is no longer in scope,
possibly not even in the same thread.
Fixes: https://tracker.ceph.com/issues/72403
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition