call of overloaded 'strlcpy(char [4096], char [4096], long unsigned int)' is ambiguous

RESOLVED FIXED in Firefox 56

Status

()

P3
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: anarchy, Assigned: gcp)

Tracking

56 Branch
mozilla57
Unspecified
Linux
Points:
---

Firefox Tracking Flags

(firefox56 fixed, firefox57 fixed)

Details

(Whiteboard: sb+)

Attachments

(1 attachment)

(Reporter)

Description

a year ago
var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/ff/_virtualenv/bin/python /var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/config/expandlibs_gen.py -o libsecurity_certverifier.a.desc Unified_cpp_certverifier0.o  
/usr/lib/ccache/bin/x86_64-gentoo-linux-musl-g++ -std=gnu++11 -o utf_string_conversion_utils.o -c  -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/ff/dist/system_wrappers -include /var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DNS_NO_XPCOM -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/ff/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/chromium-shim -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/chromium -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/nsprpub -I/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/ff/dist/include  -I/usr/include/nspr -I/usr/include/nss       -fPIC  -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/ff/mozilla-config.h -MD -MP -MF .deps/utf_string_conversion_utils.o.pp -D_GNU_SOURCE -fstack-protector-strong -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -march=native -pipe -ggdb -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe  -O2 -fomit-frame-pointer  -Wno-shadow  /var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc
/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/linux/broker/SandboxBrokerRealpath.cpp: In function 'size_t my_strlcat(char*, const char*, size_t)':
/var/tmp/portage/www-client/firefox-56.0_beta2/work/firefox-56.0b2/security/sandbox/linux/broker/SandboxBrokerRealpath.cpp:64:50: error: call of overloaded 'strlcpy(char*, const char*&, size_t)' is ambiguous
   return pos1 + strlcpy(s1 + pos1, s2, len - pos1);

Updated

a year ago
Priority: -- → P5
Whiteboard: sb+

Updated

a year ago
Priority: P5 → P3
Comment hidden (mozreview-request)
(Assignee)

Comment 2

a year ago
It looks like musl includes the (non-standard) strlcpy itself. 

Jory, does the attached patch fix the build issue?
Flags: needinfo?(anarchy)
(Reporter)

Comment 3

a year ago
/usr/lib/ccache/bin/x86_64-gentoo-linux-musl-g++ -std=gnu++11 -o SandboxBrokerRealpath.o -c -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/dist/stl_wrappers -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/dist/system_wrappers -include /var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/security/sandbox/linux/broker -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/security/sandbox/linux/broker -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/ipc/ipdl/_ipdlheaders -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ipc/chromium/src -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ipc/glue -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/security/sandbox/chromium -I/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/dist/include  -I/usr/include/nspr -I/usr/include/nss       -fPIC  -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/mozilla-config.h -MD -MP -MF .deps/SandboxBrokerRealpath.o.pp -D_GNU_SOURCE -fstack-protector-strong -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -march=native -pipe -ggdb -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe  -O2 -fomit-frame-pointer  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  /var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/security/sandbox/linux/broker/SandboxBrokerRealpath.cpp
/var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/ff/_virtualenv/bin/python /var/tmp/portage/www-client/firefox-56.0_beta5/work/firefox-56.0b5/config/expandlibs_gen.py -o libsecurity_sandbox_linux_broker.a.desc SandboxBroker.o SandboxBrokerCommon.o SandboxBrokerPolicyFactory.o SandboxBrokerRealpath.o

That would fix the issue thank you!!
(Reporter)

Updated

a year ago
Flags: needinfo?(anarchy)
(Assignee)

Updated

a year ago
Attachment #8900814 - Flags: review?(jld)

Comment 4

a year ago
mozreview-review
Comment on attachment 8900814 [details]
Bug 1391494 - Enforce use of our own copy of strlcpy.

https://reviewboard.mozilla.org/r/172262/#review179542
Attachment #8900814 - Flags: review?(jld) → review+
(Assignee)

Comment 5

a year ago
mozreview-review
Comment on attachment 8900814 [details]
Bug 1391494 - Enforce use of our own copy of strlcpy.

https://reviewboard.mozilla.org/r/172262/#review179612
Attachment #8900814 - Flags: review+

Comment 6

a year ago
Pushed by gpascutto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/10192d9e30b6
Enforce use of our own copy of strlcpy. r=jld
https://hg.mozilla.org/mozilla-central/rev/10192d9e30b6
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
(Assignee)

Comment 8

a year ago
Comment on attachment 8900814 [details]
Bug 1391494 - Enforce use of our own copy of strlcpy.

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1308400
[User impact if declined]: Compilation difficulties for some Linux distros
[Is this code covered by automated tests?]: N/A
[Has the fix been verified in Nightly?]: Landed yesterday
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No.
[Why is the change risky/not risky?]: Build-time fix.
[String changes made/needed]: N/A
Attachment #8900814 - Flags: approval-mozilla-beta?
status-firefox56: --- → affected
Comment on attachment 8900814 [details]
Bug 1391494 - Enforce use of our own copy of strlcpy.

Build time fix and low risk. Beta56+.
Attachment #8900814 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Assignee: nobody → gpascutto

Comment 10

a year ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/e2beb66c58e0
status-firefox56: affected → fixed
You need to log in before you can comment on or make changes to this bug.