Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-127604: Replace dprintf() with _Py_write_noraise()#132854

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:mainfromvstinner:puts
Apr 23, 2025

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedApr 23, 2025
edited by bedevere-appbot
Loading

@vstinner
Copy link
MemberAuthor

cc@ZeroIntensity

Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I wasn't aware of_Py_DumpHexadecimal, this works a lot better than the mess ofdup and file APIs in#132800. Thanks!

@vstinnervstinnerenabled auto-merge (squash)April 23, 2025 19:47
@vstinnervstinner merged commit402dba2 intopython:mainApr 23, 2025
41 checks passed
@vstinnervstinner deleted the puts branchApril 23, 2025 20:02
@tomasr8
Copy link
Member

This introduced a compiler warning:

Python/traceback.c:883:1:warning: ‘dump_pointer’ definedbutnotused [-Wunused-function]883 |dump_pointer(intfd,void*ptr)      | ^~~~~~~~~~~~

Maybe the function should also be behind an#ifdef?

ZeroIntensity reacted with thumbs up emoji

@vstinner
Copy link
MemberAuthor

Python/traceback.c:883:1: warning: ‘dump_pointer’ defined but not used [-Wunused-function]

I wrote#132897 to fix the warning. On which machine/OS did you see the warning?

@vstinner
Copy link
MemberAuthor

Aha, now I can see the warning on the WASI build. The configure script says:

checking for backtrace... (cached) nochecking for backtrace_symbols... (cached) no

@tomasr8
Copy link
Member

On which machine/OS did you see the warning?

I saw it on Ubuntu 24.04

@vstinner
Copy link
MemberAuthor

I saw it on Ubuntu 24.04

Ok, good to know. I suppose that you missbacktrace_symbol() function. Likely a missing dependency. On Fedora, the/usr/include/execinfo.h header is provided by theglibc-devel package.

Anyway, the warning was fixed byc292f7f. Thanks for the report.

tomasr8 reacted with thumbs up emoji

@tomasr8
Copy link
Member

Interesting, I do have the/usr/include/execinfo.h header, but thebacktrace_symbol function is missing:

externintbacktrace (void**__array,int__size)__nonnull ((1));externchar**backtrace_symbols (void*const*__array,int__size)__THROW__nonnull ((1));externvoidbacktrace_symbols_fd (void*const*__array,int__size,int__fd)__THROW__nonnull ((1));

@vstinner
Copy link
MemberAuthor

vstinner commentedApr 25, 2025
edited
Loading

configure.ac looks for these functions:

$ grep backtrace configure.ac -B1AC_CHECK_HEADERS([execinfo.h link.h dlfcn.h],                 [AC_CHECK_FUNCS(backtrace backtrace_symbols dladdr1)])

Sorry, it'sbacktrace_symbols() with S :-)

@ZeroIntensity: By the way,backtrace_symbols test can now removed fromconfigure.ac, it's no longer used, right?

@ZeroIntensity
Copy link
Member

Yup, but I don't know of a system that providesbacktrace but notbacktrace_symbols.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@tomasr8@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp