Bug 226809 - lang/ccl: Include <machine/trap.h> explicitly
Summary: lang/ccl: Include <machine/trap.h> explicitly
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jimmy Olgeni
URL:
Keywords:
Depends on:
Blocks: 226579
  Show dependency treegraph
 
Reported: 2018-03-20 22:12 UTC by John Baldwin
Modified: 2018-03-27 19:48 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (olgeni)


Attachments
trap.patch (3.20 KB, text/plain)
2018-03-20 22:12 UTC, John Baldwin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Baldwin freebsd_committer freebsd_triage 2018-03-20 22:12:43 UTC
Created attachment 191673 [details]
trap.patch

A pending change I have for src will remove the nested include of <machine/trap.h> from <machine/signal.h>.  As a result, the ccl port needs to include <machine/trap.h> explicitly for access to T_PAGEFLT.

While here, I noticed that the port was also checking the wrong field for a flag indicating if the AVX state in an mcontext_t is valid.  The flags are saved in 'mc_flags', not 'mc_trapno'.  The code might have been wrong due to a misleading comment I just fixed yesterday in head (the command claimed the flag bits applied to mc_trapno rather than mc_flags).
Comment 1 John Baldwin freebsd_committer freebsd_triage 2018-03-27 17:42:18 UTC
Ping?
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-03-27 19:46:56 UTC
A commit references this bug:

Author: olgeni
Date: Tue Mar 27 19:46:03 UTC 2018
New revision: 465746
URL: https://svnweb.freebsd.org/changeset/ports/465746

Log:
  In lang/ccl:

  - Explicitly include <machine/trap.h> for accessing T_PAGEFLT.

  - Use 'mc_flags' in mcontext_t to check for valid AVX state, rather than
    'mc_trapno'.

  PR:		226809
  Submitted by:	jhb

Changes:
  head/lang/ccl/Makefile
  head/lang/ccl/files/patch-lisp-kernel_platform-freebsdx8632.h
  head/lang/ccl/files/patch-lisp-kernel_platform-freebsdx8664.h
Comment 3 Jimmy Olgeni freebsd_committer freebsd_triage 2018-03-27 19:48:17 UTC
(In reply to John Baldwin from comment #1)

Fixed. Thanks!