Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added const qualifier to iterator to enable compiling with VS2008 #1

Merged
merged 1 commit into from Sep 2, 2014

Conversation

dhirschfeld
Copy link

No description provided.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Aug 27, 2014

Hi, please sign this Google Individual Contributor License Agreement:
https://developers.google.com/open-source/cla/individual
and update this thread when you are done. This is required for us to use your code.

@dhirschfeld
Copy link
Author

I've submitted the form electronically so we'll see where we go from there...

xfxyjwf added a commit that referenced this pull request Sep 2, 2014
Added const qualifier to iterator to enable compiling with VS2008
@xfxyjwf xfxyjwf merged commit 6890263 into protocolbuffers:master Sep 2, 2014
@dhirschfeld dhirschfeld deleted the vs2008-fix branch September 18, 2014 08:40
anandolee pushed a commit that referenced this pull request Apr 18, 2015
Rewrite of C# protogen to C++ (initial version)
anandolee added a commit that referenced this pull request May 1, 2015
TeBoring pushed a commit that referenced this pull request Jun 2, 2015
A few corrections to the proposed podspec
stoneStyle added a commit to stoneStyle/protobuf that referenced this pull request Dec 1, 2015
haberman added a commit that referenced this pull request Feb 8, 2016
liujisi pushed a commit that referenced this pull request May 12, 2016
@ghost ghost mentioned this pull request Sep 29, 2016
@jasonhe88 jasonhe88 mentioned this pull request Nov 12, 2016
@woding woding mentioned this pull request Jun 5, 2017
@pjebs pjebs mentioned this pull request Dec 12, 2017
xfxyjwf pushed a commit that referenced this pull request Feb 22, 2018
Added instruction for existing ZLIB configuration
fmg-lydonchandra added a commit to fmg-lydonchandra/protobuf that referenced this pull request Jun 29, 2023
rinarakaki referenced this pull request in rinarakaki/protobuf Aug 30, 2023
We would like for upb_Map_Delete() to optionally return the deleted value.
Unfortunately this will require several steps since we are crossing repos.
Step #1: Add a new version of the function and point all local uses at it.

PiperOrigin-RevId: 497275930
rinarakaki referenced this pull request in rinarakaki/protobuf Aug 30, 2023
This fixes an MSAN warning of the form:

```
WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7fc964f2a597 in arena_findroot third_party/upb/upb/mem/arena.c:64:3
    #1 0x7fc964f2a597 in upb_Arena_Free third_party/upb/upb/mem/arena.c:211:7
    protocolbuffers#2 0x7fc9d2af0028 in std::__msan::unique_ptr<upb_Arena, void (*)(upb_Arena*)>::~unique_ptr() third_party/crosstool/v18/stable/toolchain/bin/../include/c++/v1/__memory/unique_ptr.h:277:7
    protocolbuffers#3 0x7fc9d2aef7a2 in ~Arena third_party/upb/upb/upb.hpp:70:7
    protocolbuffers#4 0x7fc9d2aef7a2 in ~InlinedArena third_party/upb/upb/upb.hpp:97:7
    protocolbuffers#5 0x7fc9d2aef7a2 in Cpp_InlinedArena2_Test::TestBody() third_party/upb/upb/test/test_cpp.cc:187:1
    protocolbuffers#6 0x7fc97da78a57 in testing::Test::Run() third_party/googletest/googletest/src/gtest.cc:2695:5
    protocolbuffers#7 0x7fc97da7a3e8 in testing::TestInfo::Run() third_party/googletest/googletest/src/gtest.cc:2844:11
    protocolbuffers#8 0x7fc97da7b897 in testing::TestSuite::Run() third_party/googletest/googletest/src/gtest.cc:3003:30
    protocolbuffers#9 0x7fc97daa5136 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/googletest/src/gtest.cc:5899:44
    protocolbuffers#10 0x7fc97daa455c in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> third_party/googletest/googletest/src/gtest.cc
    protocolbuffers#11 0x7fc97daa455c in testing::UnitTest::Run() third_party/googletest/googletest/src/gtest.cc:5464:10
    protocolbuffers#12 0x562a7fb876f0 in RUN_ALL_TESTS third_party/googletest/googletest/include/gtest/gtest.h:2329:73
    protocolbuffers#13 0x562a7fb876f0 in main testing/base/internal/gunit_main.cc:86:10
    protocolbuffers#14 0x7fc9ba9b7632 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x61632) (BuildId: 280088eab084c30a3992a9bce5c35b44)
    protocolbuffers#15 0x562a7fafdbe9 in _start /build/work/ab393f4ac612f9027aae6b1a7226027ba2a2/google3/blaze-out/k8-opt/bin/third_party/grte/v5_src/grte-scratch/BUILD/src/csu/../sysdeps/x86_64/start.S:120

  Member fields were destroyed
    #0 0x562a7fb0b13d in __sanitizer_dtor_callback_fields third_party/llvm/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:960:5
    #1 0x7fc9d2aef79a in ~InlinedArena third_party/upb/upb/upb.hpp:105:8
    protocolbuffers#2 0x7fc9d2aef79a in ~InlinedArena third_party/upb/upb/upb.hpp:97:7
    protocolbuffers#3 0x7fc9d2aef79a in Cpp_InlinedArena2_Test::TestBody() third_party/upb/upb/test/test_cpp.cc:187:1
    protocolbuffers#4 0x7fc97da78a57 in testing::Test::Run() third_party/googletest/googletest/src/gtest.cc:2695:5
    protocolbuffers#5 0x7fc97da7a3e8 in testing::TestInfo::Run() third_party/googletest/googletest/src/gtest.cc:2844:11
    protocolbuffers#6 0x7fc97da7b897 in testing::TestSuite::Run() third_party/googletest/googletest/src/gtest.cc:3003:30
    protocolbuffers#7 0x7fc97daa5136 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/googletest/src/gtest.cc:5899:44
    protocolbuffers#8 0x7fc97daa455c in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> third_party/googletest/googletest/src/gtest.cc
    protocolbuffers#9 0x7fc97daa455c in testing::UnitTest::Run() third_party/googletest/googletest/src/gtest.cc:5464:10
    protocolbuffers#10 0x562a7fb876f0 in RUN_ALL_TESTS third_party/googletest/googletest/include/gtest/gtest.h:2329:73
    protocolbuffers#11 0x562a7fb876f0 in main testing/base/internal/gunit_main.cc:86:10
    protocolbuffers#12 0x7fc9ba9b7632 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x61632) (BuildId: 280088eab084c30a3992a9bce5c35b44)
    protocolbuffers#13 0x562a7fafdbe9 in _start /build/work/ab393f4ac612f9027aae6b1a7226027ba2a2/google3/blaze-out/k8-opt/bin/third_party/grte/v5_src/grte-scratch/BUILD/src/csu/../sysdeps/x86_64/start.S:120
```

PiperOrigin-RevId: 511849224
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
…n_rewrite

Rewrite of C# protogen to C++ (initial version)
copybara-service bot pushed a commit that referenced this pull request Oct 13, 2023
PiperOrigin-RevId: 573070911
copybara-service bot pushed a commit that referenced this pull request Oct 13, 2023
PiperOrigin-RevId: 573070911
copybara-service bot pushed a commit that referenced this pull request Oct 13, 2023
PiperOrigin-RevId: 573311752
copybara-service bot pushed a commit that referenced this pull request Dec 14, 2023
Before, every charAt would emit (on android):
```
    0x00002104    adrp x17, #+0x1000 (addr 0x3000)
    0x00002108    ldr w17, [x17, #20]
    0x0000210c    ldr x0, [x0, #128]
    0x00002110    ldr x0, [x0, #328]
    0x00002114    ldr lr, [x0, #24]
    0x00002118    blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
    0x000020b4    ldur w16, [x4, #-8]
    0x000020b8    tbnz w16, #0, #+0xc (addr 0x20c4)
    0x000020bc    ldrb w4, [x4, x0]
    0x000020c0    b #+0x8 (addr 0x20c8)
    0x000020c4    ldrh w4, [x4, x0, lsl #1]
```

PiperOrigin-RevId: 590821750
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
Before, every charAt would emit (on android):
```
    0x00002104    adrp x17, #+0x1000 (addr 0x3000)
    0x00002108    ldr w17, [x17, #20]
    0x0000210c    ldr x0, [x0, #128]
    0x00002110    ldr x0, [x0, #328]
    0x00002114    ldr lr, [x0, #24]
    0x00002118    blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
    0x000020b4    ldur w16, [x4, #-8]
    0x000020b8    tbnz w16, #0, #+0xc (addr 0x20c4)
    0x000020bc    ldrb w4, [x4, x0]
    0x000020c0    b #+0x8 (addr 0x20c8)
    0x000020c4    ldrh w4, [x4, x0, lsl #1]
```

PiperOrigin-RevId: 590821750
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
Before, every charAt would emit (on android):
```
    0x00002104    adrp x17, #+0x1000 (addr 0x3000)
    0x00002108    ldr w17, [x17, #20]
    0x0000210c    ldr x0, [x0, #128]
    0x00002110    ldr x0, [x0, #328]
    0x00002114    ldr lr, [x0, #24]
    0x00002118    blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
    0x000020b4    ldur w16, [x4, #-8]
    0x000020b8    tbnz w16, #0, #+0xc (addr 0x20c4)
    0x000020bc    ldrb w4, [x4, x0]
    0x000020c0    b #+0x8 (addr 0x20c8)
    0x000020c4    ldrh w4, [x4, x0, lsl #1]
```

PiperOrigin-RevId: 591147406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants