All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/24] [RFC] Don't rely on undefined behavior when casting function pointers
@ 2016-04-22 13:10 John Ernberg
  2016-04-22 13:10 ` [PATCH 01/24] atmodem: don't " John Ernberg
  2016-04-22 20:42 ` [PATCH 00/24] [RFC] Don't " Denis Kenzior
  0 siblings, 2 replies; 29+ messages in thread
From: John Ernberg @ 2016-04-22 13:10 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3476 bytes --]

From: John Ernberg <john.ernberg@actia.se>

Casting between incompatible function pointer types is undefined.
While it works fine on x86, it's not a good idea to depend on this.

This RFC uses g_slist_free_full where possible, and when it's not works around
the casting using other means such as wrappers or fixing function parameters.

John Ernberg (24):
  atmodem: don't rely on undefined behavior when casting function
    pointers
  hfpmodem: don't rely on undefined behavior when casting function
    pointers
  ifxmodem: don't rely on undefined behavior when casting function
    pointers
  ril: don't rely on undefined behavior when casting function pointers
  stemodem: don't rely on undefined behavior when casting function
    pointers
  gatchat: don't rely on undefined behavior when casting function
    pointers
  bluez4: don't rely on undefined behavior when casting function
    pointers
  sm: don't rely on undefined behavior when casting function pointers
  cbs: don't rely on undefined behavior when casting function pointers
  cdma/sms: don't rely on undefined behavior when casting function
    pointers
  handsfree: don't rely on undefined behavior when casting function
    pointers
  modem: don't rely on undefined behavior when casting function pointers
  network: don't rely on undefined behavior when casting function
    pointers
  phonebook: don't rely on undefined behavior when casting function
    pointers
  sim: don't rely on undefined behavior when casting function pointers
  simfs: don't rely on undefined behavior when casting function pointers
  simutil: don't rely on undefined behavior when casting function
    pointers
  sms: don't rely on undefined behavior when casting function pointers
  smsutil: don't rely on undefined behavior when casting function
    pointers
  stk: don't rely on undefined behavior when casting function pointers
  stkutil: don't rely on undefined behavior when casting function
    pointers
  ussd: don't rely on undefined behavior when casting function pointers
  voicecall: don't rely on undefined behavior when casting function
    pointers
  unittest: don't rely on undefined behavior when casting function
    pointers

 drivers/atmodem/voicecall.c  |  6 ++----
 drivers/hfpmodem/voicecall.c |  6 ++----
 drivers/ifxmodem/voicecall.c |  3 +--
 drivers/rilmodem/voicecall.c |  6 ++----
 drivers/stemodem/voicecall.c |  3 +--
 gatchat/gatchat.c            | 13 +++++--------
 plugins/bluez4.c             |  7 +++----
 plugins/smart-messaging.c    |  6 ++----
 src/cbs.c                    | 27 +++++++++------------------
 src/cdma-smsutil.c           |  3 +--
 src/handsfree.c              |  3 +--
 src/modem.c                  |  6 ++----
 src/network.c                |  3 +--
 src/phonebook.c              | 24 ++++++++++++++----------
 src/sim.c                    | 29 ++++++++++-------------------
 src/simfs.c                  |  6 +++---
 src/simutil.c                |  6 ++----
 src/sms.c                    |  9 +++------
 src/smsutil.c                | 21 +++++++--------------
 src/stk.c                    | 10 +++++++---
 src/stkutil.c                | 39 ++++++++++++---------------------------
 src/ussd.c                   | 10 +++++-----
 src/voicecall.c              |  7 ++-----
 unit/test-sms.c              | 21 +++++++--------------
 24 files changed, 104 insertions(+), 170 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-04-25 17:21 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 13:10 [PATCH 00/24] [RFC] Don't rely on undefined behavior when casting function pointers John Ernberg
2016-04-22 13:10 ` [PATCH 01/24] atmodem: don't " John Ernberg
2016-04-22 13:10   ` [PATCH 02/24] hfpmodem: " John Ernberg
2016-04-22 13:10     ` [PATCH 03/24] ifxmodem: " John Ernberg
2016-04-22 13:10       ` [PATCH 04/24] ril: " John Ernberg
2016-04-22 13:10         ` [PATCH 05/24] stemodem: " John Ernberg
2016-04-22 13:10           ` [PATCH 06/24] gatchat: " John Ernberg
2016-04-22 13:10             ` [PATCH 07/24] bluez4: " John Ernberg
2016-04-22 13:10               ` [PATCH 08/24] sm: " John Ernberg
2016-04-22 13:10                 ` [PATCH 09/24] cbs: " John Ernberg
2016-04-22 13:10                   ` [PATCH 10/24] cdma/sms: " John Ernberg
2016-04-22 13:10                     ` [PATCH 11/24] handsfree: " John Ernberg
2016-04-22 13:10                       ` [PATCH 12/24] modem: " John Ernberg
2016-04-22 13:10                         ` [PATCH 13/24] network: " John Ernberg
2016-04-22 13:10                           ` [PATCH 14/24] phonebook: " John Ernberg
2016-04-22 13:10                             ` [PATCH 15/24] sim: " John Ernberg
2016-04-22 13:10                               ` [PATCH 16/24] simfs: " John Ernberg
2016-04-22 13:10                                 ` [PATCH 17/24] simutil: " John Ernberg
2016-04-22 13:10                                   ` [PATCH 18/24] sms: " John Ernberg
2016-04-22 13:10                                     ` [PATCH 19/24] smsutil: " John Ernberg
2016-04-22 13:10                                       ` [PATCH 20/24] stk: " John Ernberg
2016-04-22 13:10                                         ` [PATCH 21/24] stkutil: " John Ernberg
2016-04-22 13:10                                           ` [PATCH 22/24] ussd: " John Ernberg
2016-04-22 13:10                                             ` [PATCH 23/24] voicecall: " John Ernberg
2016-04-22 13:10                                               ` [PATCH 24/24] unittest: " John Ernberg
2016-04-22 20:44                                         ` [PATCH 20/24] stk: " Denis Kenzior
2016-04-25  6:38                                           ` John Ernberg
2016-04-25 17:21                                             ` Denis Kenzior
2016-04-22 20:42 ` [PATCH 00/24] [RFC] Don't " Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.