Re: [protobuf] Undefined symbol when building with address sanitizer

2024-06-11 Thread 'Adam Cozzette' via Protocol Buffers
Great, that should be a safe change to patch then. I submitted this today
here
,
but it will take some time for that change to make it into a release.

On Tue, Jun 11, 2024 at 5:40 AM 'Ky Waegel' via Protocol Buffers <
protobuf@googlegroups.com> wrote:

> Yes, that seems to work.
>
> On Friday, June 7, 2024 at 2:50:24 PM UTC-7 Adam Cozzette wrote:
>
>> Does putting an asterisk in front of pb::* here
>> 
>> fix the problem? I think we're trying to export everything under the pb
>> namespace, but for some reason the type info for pb::CppFeatures is not
>> getting exported.
>>
>> On Thu, Jun 6, 2024 at 5:04 PM 'Ky Waegel' via Protocol Buffers <
>> prot...@googlegroups.com> wrote:
>>
>>> I've been working to build Protobuf with ASan and/or UBSan support
>>> (mostly for compatibility with a containing project), and I've been running
>>> into some weird symbol visibility errors. Example trying to run `protoc`
>>> with "-fsanitize=address" enabled:
>>>
>>> protobuf-27.1/libprotoc.so.27.1.0: undefined symbol:
>>> _ZTIN2pb11CppFeaturesE
>>>
>>> I initially thought this was just a weird quirk in my build system, but
>>> then I discovered this patch
>>> 
>>> to a vendored copy of Protobuf inside of MySQL 8.4.0 that reference the
>>> same symbol, mentions that the change is required for UBSan support, and
>>> fixes my symbol issue.
>>>
>>> Anyone know what's going on here? Asking here before filing a bug
>>> because I'm not entirely sure if this is a bug, or of I'm (ab)using the
>>> build flags somehow.
>>>
>>> (Initially ran into this with v24.3, but the same thing happens with
>>> v27.1.)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Protocol Buffers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to protobuf+u...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/protobuf/69654ee7-b09e-405c-b9ad-d5ad8709f1b8n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/9b8acea7-bee4-4060-9ccd-019f0a2a49c1n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CADqAXr6n_111Lme0D72EnzAkcgJiz7PFvaaGSX%3DyDnasmVgArw%40mail.gmail.com.


Re: [protobuf] Undefined symbol when building with address sanitizer

2024-06-11 Thread 'Ky Waegel' via Protocol Buffers
Yes, that seems to work.

On Friday, June 7, 2024 at 2:50:24 PM UTC-7 Adam Cozzette wrote:

> Does putting an asterisk in front of pb::* here 
> 
>  
> fix the problem? I think we're trying to export everything under the pb 
> namespace, but for some reason the type info for pb::CppFeatures is not 
> getting exported.
>
> On Thu, Jun 6, 2024 at 5:04 PM 'Ky Waegel' via Protocol Buffers <
> prot...@googlegroups.com> wrote:
>
>> I've been working to build Protobuf with ASan and/or UBSan support 
>> (mostly for compatibility with a containing project), and I've been running 
>> into some weird symbol visibility errors. Example trying to run `protoc` 
>> with "-fsanitize=address" enabled:
>>
>> protobuf-27.1/libprotoc.so.27.1.0: undefined symbol: 
>> _ZTIN2pb11CppFeaturesE
>>
>> I initially thought this was just a weird quirk in my build system, but 
>> then I discovered this patch 
>> 
>>  
>> to a vendored copy of Protobuf inside of MySQL 8.4.0 that reference the 
>> same symbol, mentions that the change is required for UBSan support, and 
>> fixes my symbol issue.
>>
>> Anyone know what's going on here? Asking here before filing a bug because 
>> I'm not entirely sure if this is a bug, or of I'm (ab)using the build flags 
>> somehow.
>>
>> (Initially ran into this with v24.3, but the same thing happens with 
>> v27.1.)
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to protobuf+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/69654ee7-b09e-405c-b9ad-d5ad8709f1b8n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/9b8acea7-bee4-4060-9ccd-019f0a2a49c1n%40googlegroups.com.


Re: [protobuf] Undefined symbol when building with address sanitizer

2024-06-11 Thread 'Ky Waegel' via Protocol Buffers
Yes, using **pb::*;* seems to fix the issue. Would that be a more 
appropriate change if I'm trying to patch the copy I'm building?

On Friday, June 7, 2024 at 2:50:24 PM UTC-7 Adam Cozzette wrote:

> Does putting an asterisk in front of pb::* here 
> 
>  
> fix the problem? I think we're trying to export everything under the pb 
> namespace, but for some reason the type info for pb::CppFeatures is not 
> getting exported.
>
> On Thu, Jun 6, 2024 at 5:04 PM 'Ky Waegel' via Protocol Buffers <
> prot...@googlegroups.com> wrote:
>
>> I've been working to build Protobuf with ASan and/or UBSan support 
>> (mostly for compatibility with a containing project), and I've been running 
>> into some weird symbol visibility errors. Example trying to run `protoc` 
>> with "-fsanitize=address" enabled:
>>
>> protobuf-27.1/libprotoc.so.27.1.0: undefined symbol: 
>> _ZTIN2pb11CppFeaturesE
>>
>> I initially thought this was just a weird quirk in my build system, but 
>> then I discovered this patch 
>> 
>>  
>> to a vendored copy of Protobuf inside of MySQL 8.4.0 that reference the 
>> same symbol, mentions that the change is required for UBSan support, and 
>> fixes my symbol issue.
>>
>> Anyone know what's going on here? Asking here before filing a bug because 
>> I'm not entirely sure if this is a bug, or of I'm (ab)using the build flags 
>> somehow.
>>
>> (Initially ran into this with v24.3, but the same thing happens with 
>> v27.1.)
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to protobuf+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/69654ee7-b09e-405c-b9ad-d5ad8709f1b8n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/097ad09f-ef62-4ac5-b356-a0153d4c2c99n%40googlegroups.com.


Re: [protobuf] Undefined symbol when building with address sanitizer

2024-06-07 Thread 'Adam Cozzette' via Protocol Buffers
Does putting an asterisk in front of pb::* here

fix the problem? I think we're trying to export everything under the pb
namespace, but for some reason the type info for pb::CppFeatures is not
getting exported.

On Thu, Jun 6, 2024 at 5:04 PM 'Ky Waegel' via Protocol Buffers <
protobuf@googlegroups.com> wrote:

> I've been working to build Protobuf with ASan and/or UBSan support (mostly
> for compatibility with a containing project), and I've been running into
> some weird symbol visibility errors. Example trying to run `protoc` with "
> -fsanitize=address" enabled:
>
> protobuf-27.1/libprotoc.so.27.1.0: undefined symbol: _ZTIN2pb11CppFeaturesE
>
> I initially thought this was just a weird quirk in my build system, but
> then I discovered this patch
> 
> to a vendored copy of Protobuf inside of MySQL 8.4.0 that reference the
> same symbol, mentions that the change is required for UBSan support, and
> fixes my symbol issue.
>
> Anyone know what's going on here? Asking here before filing a bug because
> I'm not entirely sure if this is a bug, or of I'm (ab)using the build flags
> somehow.
>
> (Initially ran into this with v24.3, but the same thing happens with
> v27.1.)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/69654ee7-b09e-405c-b9ad-d5ad8709f1b8n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CADqAXr5SpM87fXFHRRS--A6cCJQ98pi%3DO_jBhChP6BrtAH81SQ%40mail.gmail.com.


[protobuf] Undefined symbol when building with address sanitizer

2024-06-06 Thread 'Ky Waegel' via Protocol Buffers
I've been working to build Protobuf with ASan and/or UBSan support (mostly 
for compatibility with a containing project), and I've been running into 
some weird symbol visibility errors. Example trying to run `protoc` with "
-fsanitize=address" enabled:

protobuf-27.1/libprotoc.so.27.1.0: undefined symbol: _ZTIN2pb11CppFeaturesE

I initially thought this was just a weird quirk in my build system, but 
then I discovered this patch 

 
to a vendored copy of Protobuf inside of MySQL 8.4.0 that reference the 
same symbol, mentions that the change is required for UBSan support, and 
fixes my symbol issue.

Anyone know what's going on here? Asking here before filing a bug because 
I'm not entirely sure if this is a bug, or of I'm (ab)using the build flags 
somehow.

(Initially ran into this with v24.3, but the same thing happens with v27.1.)

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/69654ee7-b09e-405c-b9ad-d5ad8709f1b8n%40googlegroups.com.