Skip to content

Conversation

dhirschfeld
Copy link

No description provided.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Aug 27, 2014

I'm not sure whether this is the right change. My understanding is that cpp_message.py is only used for Python CPPv1. We probably should delete it instead.

@dhirschfeld
Copy link
Author

There are 2 implementations of cpp_message, one in internal which @gpshead says in issue #2 should have been deleted.

There's a second implementation in pyext which seems to be a lightweight wrapper over the cpp _message module which seems to be required because its referenced in reflection.py.

Without specifying cpp_message.py in thge py_modules list neither cpp_message.py, nor the __init__.py are copied to the pyext module hence _message.pyd isn't importable in the resulting package. if the second pyext\cpp_message.py module isn't required perhaps the __init__.py will have to be specified to force it to appear in the resulting python package

xfxyjwf added a commit that referenced this pull request Oct 2, 2014
Explicitly specify pyext/cpp_message.py in py_modules list
@xfxyjwf xfxyjwf merged commit eb223ed into protocolbuffers:master Oct 2, 2014
@xfxyjwf
Copy link
Contributor

xfxyjwf commented Oct 2, 2014

This should fixes issue #34

@dhirschfeld dhirschfeld deleted the pyext-fix branch October 13, 2014 09:18
@asraa asraa mentioned this pull request Nov 15, 2019
PierrickVoulet pushed a commit to PierrickVoulet/protobuf that referenced this pull request May 27, 2020
PierrickVoulet pushed a commit to PierrickVoulet/protobuf that referenced this pull request May 28, 2020
rschu1ze referenced this pull request in ClickHouse/google-protobuf Jun 1, 2023
==500166==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xdd383e in google::protobuf::compiler::DiskSourceTree::OpenDiskFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:504:7
    #1 0xdd1eb2 in google::protobuf::compiler::DiskSourceTree::DiskFileToVirtualFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:431:51
    #2 0x540619 in google::protobuf::compiler::CommandLineInterface::MakeProtoProtoPathRelative(google::protobuf::compiler::DiskSourceTree*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, google::protobuf::DescriptorDatabase*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1362:24
    #3 0x5314fb in google::protobuf::compiler::CommandLineInterface::MakeInputsBeProtoPathRelative(google::protobuf::compiler::DiskSourceTree*, google::protobuf::DescriptorDatabase*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1415:10
    #4 0x5314fb in google::protobuf::compiler::CommandLineInterface::InitializeDiskSourceTree(google::protobuf::compiler::DiskSourceTree*, google::protobuf::DescriptorDatabase*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1168:8
    #5 0x52541f in google::protobuf::compiler::CommandLineInterface::Run(int, char const* const*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1026:10
    #6 0x50f5d6 in google::protobuf::compiler::ProtobufMain(int, char**) build_msan/./contrib/protobuf/src/google/protobuf/compiler/main.cc:104:14
    protocolbuffers#7 0x50fe58 in main build_msan/./contrib/protobuf/src/google/protobuf/compiler/main.cc:112:10
    protocolbuffers#8 0x7f817143db24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    protocolbuffers#9 0x48904d in _start (/mnt/ch/ClickHouse/build_msan/contrib/protobuf-cmake/protoc+0x48904d)

  Uninitialized value was created by an allocation of 'sb' in the stack frame of function '_ZN6google8protobuf8compiler14DiskSourceTree12OpenDiskFileERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE'
    #0 0xdd3320 in google::protobuf::compiler::DiskSourceTree::OpenDiskFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:492

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:504:7 in google::protobuf::compiler::DiskSourceTree::OpenDiskFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Exiting
copybara-service bot pushed a commit that referenced this pull request Oct 13, 2023
copybara-service bot pushed a commit that referenced this pull request Oct 15, 2023
copybara-service bot pushed a commit that referenced this pull request Oct 15, 2023
rschu1ze referenced this pull request in ClickHouse/google-protobuf Oct 24, 2023
==500166==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xdd383e in google::protobuf::compiler::DiskSourceTree::OpenDiskFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:504:7
    #1 0xdd1eb2 in google::protobuf::compiler::DiskSourceTree::DiskFileToVirtualFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:431:51
    #2 0x540619 in google::protobuf::compiler::CommandLineInterface::MakeProtoProtoPathRelative(google::protobuf::compiler::DiskSourceTree*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, google::protobuf::DescriptorDatabase*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1362:24
    #3 0x5314fb in google::protobuf::compiler::CommandLineInterface::MakeInputsBeProtoPathRelative(google::protobuf::compiler::DiskSourceTree*, google::protobuf::DescriptorDatabase*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1415:10
    #4 0x5314fb in google::protobuf::compiler::CommandLineInterface::InitializeDiskSourceTree(google::protobuf::compiler::DiskSourceTree*, google::protobuf::DescriptorDatabase*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1168:8
    #5 0x52541f in google::protobuf::compiler::CommandLineInterface::Run(int, char const* const*) build_msan/./contrib/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1026:10
    #6 0x50f5d6 in google::protobuf::compiler::ProtobufMain(int, char**) build_msan/./contrib/protobuf/src/google/protobuf/compiler/main.cc:104:14
    protocolbuffers#7 0x50fe58 in main build_msan/./contrib/protobuf/src/google/protobuf/compiler/main.cc:112:10
    protocolbuffers#8 0x7f817143db24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    protocolbuffers#9 0x48904d in _start (/mnt/ch/ClickHouse/build_msan/contrib/protobuf-cmake/protoc+0x48904d)

  Uninitialized value was created by an allocation of 'sb' in the stack frame of function '_ZN6google8protobuf8compiler14DiskSourceTree12OpenDiskFileERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE'
    #0 0xdd3320 in google::protobuf::compiler::DiskSourceTree::OpenDiskFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:492

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_msan/./contrib/protobuf/src/google/protobuf/compiler/importer.cc:504:7 in google::protobuf::compiler::DiskSourceTree::OpenDiskFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Exiting
copybara-service bot pushed a commit that referenced this pull request Dec 11, 2023
```
int com.google.android.test.Outer.computeUInt32SizeNoTag(int) [24 bytes]
    0x000024d0    mov w0, #0x160
    0x000024d4    clz w1, w1
    0x000024d8    add w1, w1, w1, lsl #3
    0x000024dc    sub w0, w0, w1
    0x000024e0    lsr w0, w0, #6
    0x000024e4    ret
```
versus existing:
```
int com.google.android.test.Outer.computeUInt32SizeNoTag(int) [72 bytes]
    0x000022a0    and w0, w1, #0xffffff80
    0x000022a4    cbnz w0, #+0xc (addr 0x22b0)
    0x000022a8    mov w0, #0x1
    0x000022ac    b #+0x38 (addr 0x22e4)
    0x000022b0    and w0, w1, #0xffffc000
    0x000022b4    cbnz w0, #+0xc (addr 0x22c0)
    0x000022b8    mov w0, #0x2
    0x000022bc    b #+0x28 (addr 0x22e4)
    0x000022c0    and w0, w1, #0xffe00000
    0x000022c4    cbnz w0, #+0xc (addr 0x22d0)
    0x000022c8    mov w0, #0x3
    0x000022cc    b #+0x18 (addr 0x22e4)
    0x000022d0    mov w2, #0x5
    0x000022d4    mov w0, #0x4
    0x000022d8    and w1, w1, #0xf0000000
    0x000022dc    cmp w1, #0x0 (0)
    0x000022e0    csel w0, w2, w0, ne
    0x000022e4    ret
```

PiperOrigin-RevId: 584143825
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
```
int com.google.android.test.Outer.computeUInt32SizeNoTag(int) [24 bytes]
    0x000024d0    mov w0, #0x160
    0x000024d4    clz w1, w1
    0x000024d8    add w1, w1, w1, lsl #3
    0x000024dc    sub w0, w0, w1
    0x000024e0    lsr w0, w0, #6
    0x000024e4    ret
```
versus existing:
```
int com.google.android.test.Outer.computeUInt32SizeNoTag(int) [72 bytes]
    0x000022a0    and w0, w1, #0xffffff80
    0x000022a4    cbnz w0, #+0xc (addr 0x22b0)
    0x000022a8    mov w0, #0x1
    0x000022ac    b #+0x38 (addr 0x22e4)
    0x000022b0    and w0, w1, #0xffffc000
    0x000022b4    cbnz w0, #+0xc (addr 0x22c0)
    0x000022b8    mov w0, #0x2
    0x000022bc    b #+0x28 (addr 0x22e4)
    0x000022c0    and w0, w1, #0xffe00000
    0x000022c4    cbnz w0, #+0xc (addr 0x22d0)
    0x000022c8    mov w0, #0x3
    0x000022cc    b #+0x18 (addr 0x22e4)
    0x000022d0    mov w2, #0x5
    0x000022d4    mov w0, #0x4
    0x000022d8    and w1, w1, #0xf0000000
    0x000022dc    cmp w1, #0x0 (0)
    0x000022e0    csel w0, w2, w0, ne
    0x000022e4    ret
```

PiperOrigin-RevId: 591113652
GerHobbelt pushed a commit to GerHobbelt/protobuf that referenced this pull request Aug 4, 2024
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 673536874
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675266565
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675266565
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675266565
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675266565
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675266565
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675266565
copybara-service bot pushed a commit that referenced this pull request Sep 16, 2024
…take #3 but disabled)

PiperOrigin-RevId: 675319986
copybara-service bot pushed a commit that referenced this pull request Mar 10, 2025
Before:

```
        ldrh    w8, [x1, #6]
        sxth    x9, w8
        and     w8, w8, #0x7
        lsr     x9, x9, #3
        ldrb    w9, [x0, x9]
        lsr     w8, w9, w8
        and     w0, w8, #0x1
        ret
```

After:

```
        ldrh    w8, [x1, #6]
        lsr     x9, x8, #3
        and     w8, w8, #0x7
        ldrb    w9, [x0, x9]
        lsr     w8, w9, w8
        and     w0, w8, #0x1
        ret
```

PiperOrigin-RevId: 735497444
copybara-service bot pushed a commit that referenced this pull request Mar 11, 2025
Before:

```
        ldrh    w8, [x1, #6]
        sxth    x9, w8
        and     w8, w8, #0x7
        lsr     x9, x9, #3
        ldrb    w9, [x0, x9]
        lsr     w8, w9, w8
        and     w0, w8, #0x1
        ret
```

After:

```
        ldrh    w8, [x1, #6]
        lsr     x9, x8, #3
        and     w8, w8, #0x7
        ldrb    w9, [x0, x9]
        lsr     w8, w9, w8
        and     w0, w8, #0x1
        ret
```

PiperOrigin-RevId: 735610397
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.

3 participants