Skip to content

Commit

Permalink
Fix CMakeLists and mutation-while-iterating problem
Browse files Browse the repository at this point in the history
  • Loading branch information
rshin committed Feb 27, 2017
1 parent 4238edf commit f41ff79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/plasma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ endif(APPLE)
include_directories("${PYTHON_INCLUDE_DIRS}" thirdparty)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -D_XOPEN_SOURCE=500
-D_POSIX_C_SOURCE=200809L")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L")

# Compile flatbuffers

Expand Down
6 changes: 3 additions & 3 deletions src/plasma/plasma_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ void update_object_get_requests(PlasmaStoreState *store_state,
std::vector<GetRequest *> &get_requests =
store_state->object_get_requests[obj_id];
int index = 0;
// TODO(rshin): return_from_get below will invalidate the iterators in the
// iteration, so the below code is incorrect.
for (GetRequest *get_req : get_requests) {
int num_requests = get_requests.size();
for (int i = 0; i < num_requests; ++i) {
GetRequest *get_req = get_requests[index];
int num_updated = 0;
for (int j = 0; j < get_req->num_objects_to_wait_for; ++j) {
object_table_entry *entry;
Expand Down

0 comments on commit f41ff79

Please sign in to comment.