You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "BiteTheDDDDt (via GitHub)" <gi...@apache.org> on 2023/05/17 10:07:28 UTC
[GitHub] [doris] BiteTheDDDDt opened a new pull request, #19753: [Chore](build) fix some undefined behavior about incomplete type vector
BiteTheDDDDt opened a new pull request, #19753:
URL: https://github.com/apache/doris/pull/19753
# Proposed changes
incomplete type vector is ub, this pr will fix it.
https://www.lukas-barth.net/blog/cpp20-vector-incomplete/
https://reviews.llvm.org/D68365
## Problem summary
Describe your changes.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #19753: [Chore](build) fix some undefined behavior about incomplete type vector
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #19753:
URL: https://github.com/apache/doris/pull/19753#discussion_r1197376821
##########
thirdparty/patches/rocksdb-5.14.2.patch:
##########
@@ -9,3 +9,88 @@
std::queue<T> buffer_;
bool eof_;
};
+diff --git a/include/rocksdb/metadata.h b/include/rocksdb/metadata.h
+--- a/include/rocksdb/metadata.h
++++ b/include/rocksdb/metadata.h
+@@ -15,42 +15,6 @@
+
+ namespace rocksdb {
+ struct ColumnFamilyMetaData;
+-struct LevelMetaData;
Review Comment:
```cpp
struct Inner;
struct S {
std::vector<Inner> v;
};
struct Inner {
int a;
};
```
This is a UB example.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on pull request #19753: [Chore](build) fix some undefined behavior about incomplete type vector
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on PR #19753:
URL: https://github.com/apache/doris/pull/19753#issuecomment-1551115872
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19753: [Chore](build) fix some undefined behavior about incomplete type vector
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19753:
URL: https://github.com/apache/doris/pull/19753#issuecomment-1551119431
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei merged pull request #19753: [Chore](build) fix some undefined behavior about incomplete type vector
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #19753:
URL: https://github.com/apache/doris/pull/19753
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #19753: [Chore](build) fix some undefined behavior about incomplete type vector
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #19753:
URL: https://github.com/apache/doris/pull/19753#discussion_r1197375813
##########
thirdparty/patches/rocksdb-5.14.2.patch:
##########
@@ -9,3 +9,88 @@
std::queue<T> buffer_;
bool eof_;
};
+diff --git a/include/rocksdb/metadata.h b/include/rocksdb/metadata.h
+--- a/include/rocksdb/metadata.h
++++ b/include/rocksdb/metadata.h
+@@ -15,42 +15,6 @@
+
+ namespace rocksdb {
+ struct ColumnFamilyMetaData;
+-struct LevelMetaData;
Review Comment:
By changing the declaration order, the forward declaration is removed, then T is not incomplete type when defining vector<T>.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on a diff in pull request #19753: [Chore](build) fix some undefined behavior about incomplete type vector
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #19753:
URL: https://github.com/apache/doris/pull/19753#discussion_r1197312832
##########
thirdparty/patches/rocksdb-5.14.2.patch:
##########
@@ -9,3 +9,88 @@
std::queue<T> buffer_;
bool eof_;
};
+diff --git a/include/rocksdb/metadata.h b/include/rocksdb/metadata.h
+--- a/include/rocksdb/metadata.h
++++ b/include/rocksdb/metadata.h
+@@ -15,42 +15,6 @@
+
+ namespace rocksdb {
+ struct ColumnFamilyMetaData;
+-struct LevelMetaData;
Review Comment:
I did not find any changes. I find you only change the sequence of these code, including thrift defenitions. Anything wrong in previous code?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org