After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769935 - Compiled vala code contains absolute build paths
Compiled vala code contains absolute build paths
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
0.32.x
Other All
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks: 688447
 
 
Reported: 2016-08-15 13:08 UTC by Christian Stadelmann
Modified: 2018-05-14 08:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codegen: Don't include the full absolute path in line directives (1.13 KB, patch)
2017-04-27 19:29 UTC, Rico Tzschichholz
none Details | Review
codegen: Don't include the full absolute path in line directives (1.18 KB, patch)
2017-05-02 08:30 UTC, Rico Tzschichholz
committed Details | Review

Description Christian Stadelmann 2016-08-15 13:08:34 UTC
I'll put the description into comment #1. This is due to bug #744491.
Comment 1 Christian Stadelmann 2016-08-15 13:08:49 UTC
Steps to reproduce:
1. compile any vala code (you probably have to use debug config)
2. debug vala application

What happens:
Executable contains absolute(!) paths where source files resided before compilation.

In Fedora 24's tracker build I get lines like these in backtraces:

  • #13 tracker_sparql_pattern_parse_property_list_not_empty
    at /home/carlos/Source/gnome/tracker/src/libtracker-data/tracker-sparql-pattern.vala line 1544

What should happen:
As C applications behave, vala paths should be relative to project root.

Additional info:
• Reproducible builds are only possible when having the exact same filesystem layout. Reproducible builds would be good for checking integrity of both your distribution and your compiler
• Data leak
Comment 2 Rico Tzschichholz 2017-04-27 19:29:27 UTC
Created attachment 350591 [details] [review]
codegen: Don't include the full absolute path in line directives

Only write the source's filename without any path.
Comment 3 Al Thomas 2017-04-27 20:31:35 UTC
Review of attachment 350591 [details] [review]:

If possible, I think the patch should make use of context.basedir
If context.basedir is "." then remove the current working directory file path from the source reference, otherwise remove context.basedir path?
Comment 4 Rico Tzschichholz 2017-05-02 08:30:29 UTC
Created attachment 350848 [details] [review]
codegen: Don't include the full absolute path in line directives

Only write source's filename prepended by the path relative to the
directory the valac call origined from.
Comment 5 Rico Tzschichholz 2018-05-14 08:33:07 UTC
Attachment 350848 [details] pushed as 49e5fc6 - codegen: Don't include the full absolute path in line directives