Provide our own implementation of C's getline on Android
Categories
(Core :: mozglue, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: sergesanspaille, Assigned: sergesanspaille)
References
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #914190 +++
We can't use getline() from Gecko on Android Jelly Bean because it calls bionic's realloc (not overrideable, despite having default visbility), and the caller needs to free() the result, and that will use jemalloc's free().
So, write a getline(), or import someone else's, and add it to libmozglue.
Assignee | ||
Comment 1•1 years ago
|
||
10 years ago (!) Bug 914190 already choked on the fact that bionic's
getline implementation could realloc a buffer using a function call
we cannot intercept, resulting in different memory allocator being used
to allocate and free the getline buffer.
This got hit again by 1850948, causing a backout. The approach taken at
that time (use std::getline) is neither future-proof (as demonstrated by
the backout) nor always satisfying (std::string as a few limitations in
term of low-level buffer manipulation).
Provide our implementation for Android, as hinted by the original bug.
Updated•1 years ago
|
Updated•1 years ago
|
Comment 3•1 years ago
|
||
bugherder |
Description
•